MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 384

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

Advertisement

The following is an example of using
code, the
loop adds the numbers from 1 to 100:
for
var sum = 0;
for (var i=1; i<=100; i++) {
sum = sum + i;
}
See also
++ (increment)
for..in
Availability
Flash Player 5.
Usage
for(variableIterant in object){
statement(s);
}
Parameters
variableIterant
object or element in an array.
The name of an object to be repeated.
object
statement(s)
Returns
Nothing.
Description
Statement; loops through the properties of an object or element in an array, and executes the
for each property of an object.
statement
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.
The
statement iterates over properties of objects in the iterated object's prototype chain.
for..in
If the child's prototype is
iterate over the properties of
The
action enumerates all objects in the prototype chain of an object. Properties of the
for..in
object are enumerated first, then properties of its immediate prototype, then properties of the
prototype's prototype, and so on. The
name twice. If the object
action called on
for..in
384
Chapter 12: ActionScript Dictionary
for
,
,
–– (decrement)
for..in
The name of a variable to act as the iterant, referencing each property of an
An instruction to execute for each iteration.
Array.sort()
, iterating over the properties of the child with
parent
.
parent
for..in
has prototype
child
enumerates
child
to perform the same action repeatedly. In the following
,
var
or
actions. For example, the built-in
for
for..in
and
Array.reverse()
action does not enumerate the same property
and both contain the property
parent
from
but ignores the one in
prop
child
) are not included in
and
, are not
_x
_y
, will also
for..in
, the
prop
parent
.

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