else
69
else
Availability
Flash Lite 1.0.
Usage
if (
condition
){
t-statement(s);
} else {
f-statement(s);
}
Parameters
condition
An expression that evaluates to
true
or
false
.
t-statement(s)
The instructions to execute if the condition evaluates to
true
.
f-statement(s)
An alternative series of instructions to execute if the condition evaluates
to
false
.
Description
Statement; specifies the statements to run if the condition in the
if
statement evaluates
to
false
.
Example
The following example shows the use of the
else
statement with a condition. An actual
example would include code to take some action based on the condition.
currentHighestDepth = 1;
if (currentHighestDepth == 2) {
//trace ("currentHighestDepth is 2");
} else {
//trace ("currentHightestDepth is not 2");
}
See also
if
Summary of Contents for FLASH 8-FLASH
Page 1: ...Flash Lite 1 x ActionScript Language Reference...
Page 6: ...6 Contents...
Page 46: ...46 Flash Lite Global Functions...
Page 62: ...62 Flash Lite Properties...
Page 76: ...76 Flash Lite Statements...
Page 110: ...110 Flash Lite Operators...
Page 162: ...162 Index...