EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 274

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
274 Chapter 12: ActionScript Dictionary
Method summary for the Array class
Property summary for the Array class
Constructor for the Array class
Availability
Flash Player 5.
Usage
new Array()
new Array(length)
new Array(element0, element1, element2,...elementN)
Parameters
length
An integer specifying the number of elements in the array. In the case of noncontiguous
elements, the length parameter specifies the index number of the last element in the array plus 1.
element0...elementN A list of two or more arbitrary values. The values can be numbers,
strings, objects, or other arrays. The first element in an array always has an index or position of 0.
Returns
Nothing.
Method Description
Array.concat() Concatenates the parameters and returns them as a new array.
Array.join() Joins all elements of an array into a string.
Array.pop() Removes the last element of an array and returns its value.
Array.push() Adds one or more elements to the end of an array and returns the array’s new
length.
Array.reverse() Reverses the direction of an array.
Array.shift() Removes the first element from an array and returns its value.
Array.slice() Extracts a section of an array and returns it as a new array.
Array.sort() Sorts an array in place.
Array.sortOn() Sorts an array based on a field in the array.
Array.splice() Adds and removes elements from an array.
Array.toString() Returns a string value representing the elements in the Array object.
Array.unshift() Adds one or more elements to the beginning of an array and returns the array’s
new length.
Property Description
Array.length A nonzero-based integer specifying the number of elements in the array.

Table of Contents

Related product manuals