MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 383

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

for
Availability
Flash Player 5.
Usage
for(init; condition; next) {
statement(s);
}
Parameters
An expression to evaluate before beginning the looping sequence, typically an assignment
init
expression. A
var
An expression that evaluates to
condition
each loop iteration; the loop exits when the condition evaluates to
An expression to evaluate after each loop iteration; usually an assignment expression using
next
the
(increment) or
++
statement(s)
Description
Statement; a loop construct that evaluates the
looping sequence by which, as long as the
and the next expression is evaluated.
Some properties cannot be enumerated by the
methods of the Array class (such as
the enumeration of an Array object, and movie clip properties, such as
enumerated. In external class files, instance members are not enumerable; only dynamic and static
members are enumerable.
Example
The following example uses
my_array=new Array();
for(i=0; i<10; i++) {
my_array [i] = (i + 5)*10;
trace(my_array[i]);
}
The following results are displayed in the Output panel:
50
60
70
80
90
100
110
120
130
140
statement is also permitted for this parameter.
(decrement) operators.
--
An instruction or instructions to execute within the body of the loop.
Array.sort()
to add the elements in an array:
for
or
. The condition is evaluated before
true
false
(initialize) expression once, and then begins a
init
evaluates to
condition
or
actions. For example, the built-in
for
for..in
and
Array.reverse()
.
false
,
is executed
true
statement
) are not included in
and
, are not
_x
_y
for
383

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents