Arrays in Flash MX

Name = new Array (“Helmut”, “Granda”); trace (“FIrst Name: ” +Name[0]); trace (“Last Name: ” + Name[1]); trace(“Full Name: ” + Name[0] + ” ” + Name[1]);

Send Playhead to a Random Frame

randomFrame = random(50+1); gotoAndStop(randomFrame); trace(this._currentFrame);

Open a PDF file from Flash

//open in a new window getURL(“”,”_blank”); //open in the same window getURL(“”,”_top”); //open in a frame getURL(“”,”_frameName”);

Creating a Function 101 Basic function

//declare your function and function name: traceFunction = function(parameterPassed){ //what do you want the function to do? trace(parameterPassed); //end your function }; //Lets make it work traceFunction(“Hello Earth”)

Random Number Specifying Variable

//random(#) randomLimit = 60 myRandomNumber = random(randomLimit); trace(myRandomNumber)

Get a Random Number

//random(#) myRandomNumber = random(60); trace(myRandomNumber)

Creating a “mailto” link

//code inside a Button onRelease(){ getURL(“”) } //Code On Timeline myButton.onRelease = function(){ getURL(“”) };

Creating a Web Link

//code inside a Button onRelease(){ getURL(“”,”_blank”) } //Code On Timeline myButton.onRelease = function(){ getURL(“”,”_blank”); };