User Guide

Table Of Contents
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.