if
Availability
Flash Lite 1.0.
Usage
if (condition) {
statement(s);
}
Parameters
An expression that evaluates to
condition
The instructions to execute if the condition evaluates to
statement(s)
Description
Statement; evaluates a condition to determine the next action in a SWF file. If the condition
is
, Flash Lite runs the statements that follow the condition inside curly braces (
true
condition is
, Flash Lite skips the statements inside the curly braces and runs the
false
statements following the braces. Use the
your scripts.
Example
In the following example, the condition inside the parentheses evaluates the variable
see if it has the literal value
if(name eq "Erica"){
play();
}
72
Flash Lite Statements
true
statement to create branching logic in
if
. If it does, the
"Erica"
or
.
false
function runs.
play()
.
true
). If the
{}
to
name
Need help?
Do you have a question about the FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers