Events :
Events Things that occur during the playback of a movie, which trigger the execution of a particular script
Click a button
On (release)
Text changing in a text field
A sound completing a playback
Actions :
Actions Any line that instructs flash to do something
mugCost = 5.00;
Movie1.gotoAndPlay(50);
Operators :
Operators =, <, > , +, -, *, / ..etc
Tax = 0.6
AmtA < amtB
valTotal = val1 * 500
Keywords :
Keywords Reserved words for specific purposes in actionscript
On(press), on(release)
Break, case, continue, if, do, else, for, function, new, return, this, var, void….)
data :
data mugCost = 5.00;
Curley Braces :
Curley Braces Anything that falls within { } signifies and action or actions that needs to be performed when triggered
On (release) { play(); }
Quotation Marks :
Quotation Marks Denote textual data in script,
For script to know the difference between script and actual words
yourName = “Peter”
Comments :
Comments Flash ignores lines that contains comments,
For descriptive notes about the script
//this script is to go to the next scene
Sample script :
Sample script If (amountPaid < amountOwed) {
difference = amountOwed – amountPaid;
light.gotoAndStop(“Off”);
message.text = “You underpaid by “ + difference + “ dollars.”;
} else {
light.gotoAndStop(“On”);
message.text = “you have paid in full”;
}