Statements, Expressions, & Operators
The entire block of text in the Actions panel is a Script, where each line of code is a statement. Statements are sentences of Code.
Expressions in Flash are statements that are evaluated (that will give you
some value or return a value).
ex. mymovieclip._alpha=50
Operators perform specific (usually
math) operations
ex.
+(plus),-(minus),=(equals), * (multiply), < (less than),
> (greater than), <= (less than or equal to).
note: You check things like equality with a different operator than you assign equality.
setting and assignment:
Funny=true
Checking equality:
if (Funny == true){
then proceed
}
Notice the double == sign. This checks to see if a variable
is equal to a value or a condition. The = sign is use to set variables equal
to a value
Blocks
A block is a group of statements contained within braces {}
An opening { and a closing } are necessary to for each block of code. A block
is like a paragraph of a sentence. If these are not written in correctly,
your script will not work. Also note semicolons between statements.
example:
on (press) {
myClip._alpha=20;
myClip2._x=300;
}