Case Statement - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example uses the
var i:Number = 0;
while (true) {
trace(i);
if (i >= 10) {
break; // this will terminate/exit the loop
}
i++;
}
which traces the following output:
0
1
2
3
4
5
6
7
8
9
10
See also
for statement

case statement

case expression : statement(s)
Defines a condition for the
parameter of the
expression
will execute statements in the
or the end of the
switch
If you use the
statement outside a
case
doesn't compile.
Note: You should always end the
omit the
break statement
the next
statement instead of exiting the
case
Availability: ActionScript 1.0; Flash Lite 1.0
statement to exit an otherwise infinite loop:
break
statement. If the
switch
statement using strict equality (
switch
parameter until it encounters a
statement(s)
statement.
switch
statement(s)
from the
statement(s)
parameter equals the
expression
statement, it produces an error and the script
parameter with a break statement. If you
parameter, it continues executing with
statement.
switch
), then Flash Player
===
statement
break
Statements
181

Advertisement

Table of Contents
loading

Table of Contents