case
Availability
Flash Lite 1.0.
Usage
case expression: statements
Parameters
Any expression.
expression
Any statements.
statements
Description
Statement; defines a condition for the
parameter execute if the
parameter of the
expression
If you use the
statement outside a
case
doesn't compile.
Example
In the following example, if the
follows
executes; if the
case 1
follows
executes; and so on. If no
case 2
statement that follows the
trace()
switch (myNum) {
case 1:
trace ("case 1 tested true");
break;
case 2:
trace ("case 2 tested true");
break;
case 3:
trace ("case 3 tested true");
break;
default:
trace ("no case tested true")
}
switch
parameter that follows the
expression
statement.
switch
switch
parameter evaluates to 1, the
myNum
parameter evaluates to 2, the
myNum
case
keyword executes.
default
statement. The statements in the
case
statement, it produces an error and the code
trace()
expression matches the
statements
keyword equals the
statement that
trace()
statement that
parameter, the
number
case
65
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?