About statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
About arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
About operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
About syntax, statements, and
expressions
The ActionScript language is made up of the built-in classes that make up the ActionScript
language. You need to use correct ActionScript syntax to form statements so the code compiles
and runs correctly in Flash. In this case, syntax refers to the grammar and spelling of a
language that you program with. The compiler cannot understand incorrect syntax, so you see
errors or warnings displayed in the Output panel when you try to test the document in the
test environment. Therefore, syntax is a collection of rules and guidelines that help you form
correct ActionScript.
A statement is an instruction you give the FLA file to do something, such as to perform a
particular action. For example, you can use a conditional statement to determine whether
something is true or exists. Then you might execute actions that you specify, such as functions
or expressions, based on whether the condition is true or not. The
statement is a
if
conditional statement and evaluates a condition to determine the next action that should
occur in your code.
// if statement
if (condition) {
// statements;
}
For more information on statements, see
"About statements" on page
141.
114
Syntax and Language Fundamentals
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?