User Guide

192 ActionScript language elements
Statements
Statements are language elements that perform or specify an action. For example, the return
statement returns a result as a value of the function in which it executes. The if statement
evaluates a condition to determine the next action that should be taken. The switch statement
creates a branching structure for ActionScript statements.
Statements summary
Statement Description
break Appears within a loop (for , for..in, do..while or while) or within
a block of statements associated with a particular case within a
switch statement.
case Defines a condition for the switch statement.
class Defines a custom class, which lets you instantiate objects that share
methods and properties that you define.
continue Jumps past all remaining statements in the innermost loop and starts
the next iteration of the loop as if control had passed through to the
end of the loop normally.
default Defines the default case for a switch statement.
delete Destroys the object reference specified by the reference parameter,
and returns true if the reference is successfully deleted; false
otherwise.
do..while Similar to a while loop, except that the statements are executed once
before the initial evaluation of the condition.
dynamic Specifies that objects based on the specified class can add and
access dynamic properties at runtime.
else Specifies the statements to run if the condition in the if statement
returns false.
else if Evaluates a condition and specifies the statements to run if the
condition in the initial if statement returns false.
extends Defines a class that is a subclass of another class; the latter is the
superclass.
for Evaluates the init (initialize) expression once and then starts a
looping sequence.
for..in Iterates over the properties of an object or elements in an array and
executes the statement for each property or element.