switch
73
switch
Availability
Flash Lite 1.0.
Usage
switch (
expression)
{
caseClause
:
[
defaultClause
:]
}
Parameters
expression
Any numeric expression.
caseClause
A
case
keyword followed by an expression, a colon, and a group of statements
to execute if the expression matches the switch
expression
parameter.
defaultClause
An
optional
default
keyword followed by statements to execute if none of
the case expressions match the switch
expression
parameter.
Description
Statement; creates a branching structure for ActionScript statements. Similar to the
if
statement, the
switch
statement tests a condition and executes statements if the condition
evaluates to
true
.
Switch statements contain a fallback option called default. If no other statements are true, the
default statement is executed.
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...