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")
}
In the following example, the first case group doesn't contain a break, so if the number is 1,
both A and B appear in the Output panel:
switch (myNum) {
case 1:
trace ("A");
case 2:
trace ("B");
break;
default:
trace ("D")
}
See also
case
while
Availability
Flash Lite 1.0.
Usage
while(condition) {
statement(s);
}
74
Flash Lite Statements
parameter evaluates to 1, the
myNum
parameter evaluates to 2, the
myNum
expression matches the
case
keyword executes.
default
statement that
trace()
statement that
trace()
parameter, the
number
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?