03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

length (arguments.length property)<br />

public length : Number<br />

The number of arguments passed to the function. This may be more or less than the function<br />

declares.<br />

Array<br />

Object<br />

|<br />

+-Array<br />

public dynamic class Array<br />

extends Object<br />

The Array class lets you access <strong>and</strong> manipulate indexed arrays. An indexed array is an object<br />

whose properties are identified by a number representing their position in the array. This<br />

number is referred to as the index. All indexed arrays are zero-based, which means that the first<br />

element in the array is [0], the second element is [1], <strong>and</strong> so on. To create an Array object, you<br />

use the constructor new Array(). To access the elements of an array, you use the array access<br />

([]) operator.<br />

You can store a wide variety of data types in an array element, including numbers, strings,<br />

objects, <strong>and</strong> even other arrays. You can create a multidimensional array by creating an indexed<br />

array <strong>and</strong> assigning to each of its elements a different indexed array. Such an array is<br />

considered multidimensional because it can be used to represent data in a table.<br />

Array assignment is by reference rather than by value: when you assign one array variable to<br />

another array variable, both refer to the same array:<br />

var oneArray:Array = new Array("a", "b", "c");<br />

var twoArray:Array = oneArray; // Both array variables refer to the same<br />

array.<br />

twoArray[0] = "z";<br />

trace(oneArray); // Output: z,b,c.<br />

Array 231

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!