User Guide

Table Of Contents
64 Flash Lite Statements
break
Availability
Flash Lite 1.0.
Usage
break
Parameters
None.
Description
Statement; appears within a loop (for, do..while or while) or within a block of statements
associated with a particular case within a
switch statement. The break statement instructs
Flash Lite to skip the rest of the loop body, stop the looping action, and execute the statement
following the loop statement. When using the
break statement, the ActionScript interpreter
skips the rest of the statements in that
case block and jumps to the first statement following
the enclosing
switch statement. Use this statement to break out of a series of nested loops.
Example
The following example uses the break statement to exit an otherwise infinite loop:
i = 0;
while (true) {
if (i >= 100) {
break;
}
i++;
}
See also
case, do..while, for, switch, while
switch Similar to the
if statement, the switch statement tests a condition
and executes statements if the condition evaluates to
true.
while Tests an expression and runs a statement or series of statements
repeatedly in a loop as long as the expression is
true.
Statement Description