Flash Lite Statements

This section describes the syntax and use of Adobe's Macromedia Flash Lite 1.x ActionScript statements, which are language elements that perform or specify an action. The statements are summarized in the following table:

Statement

Description

break

Instructs Flash Lite to skip the rest of the loop body, stop the looping action, and execute the statement following the loop statement.

case

Defines a condition for the switch statement. The statements in the statements parameter execute if the expression parameter that follows the case keyword equals the expression parameter of the switch statement.

continue

Jumps past all remaining statements in the innermost loop and starts the next iteration of the loop as if control had passed normally through to the end of the loop.

do..while

Executes the statements, and then evaluates the condition in a loop for as long as the condition is true.

else

Specifies the statements to run if the condition in the if statement evaluates to false.

else if

Evaluates a condition and specifies the statements to run if the condition in the initial if statement returns a false value.

for

Evaluates the init (initialize) expression once, and then begins a looping sequence by which, as long as the condition evaluates to true, statement is executed, and the next expression is evaluated.

if

Evaluates a condition to determine the next action in a SWF file. If the condition is true, Flash Lite runs the statements that follow the condition inside curly braces ({}). If the condition is false, Flash Lite skips the statements inside the curly braces and runs the statements following the braces.

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.