De-I > if

if

Syntax

if(condition) {
statement;
}

Arguments

conditional An expression that evaluates to true or false. For example, if(name == "Erica"), evaluates the variable name to see if it is "Erica."

statements The instructions to execute if or when the condition evaluates to true.

Description

Action; evaluates a condition to determine the next action in a movie. If the condition is true, Flash runs the statements that follow. Use if to create branching logic in your scripts.

Player

Flash 4 or later.

See also

else
for
for..in