EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE - Page 72

MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE
162 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
72 Flash Lite Statements
if
Availability
Flash Lite 1.0.
Usage
if (condition) {
statement(s);
}
Parameters
condition An expression that evaluates to true or false.
statement(s) The instructions to execute if the condition evaluates to true.
Description
Statement; evaluates a condition to determine the next action in a SWF file. If the condition
is
true, Flash Lite runs the statements that follow the condition inside curly braces ({}). If the
condition is
false, Flash Lite skips the statements inside the curly braces and runs the
statements following the braces. Use the
if statement to create branching logic in
your scripts.
Example
In the following example, the condition inside the parentheses evaluates the variable name to
see if it has the literal value
"Erica". If it does, the play() function runs.
if(name eq "Erica"){
play();
}

Table of Contents

Related product manuals