254
ActionScript classes
RETURNINDEXEDARRAY
(Array.RETURNINDEXEDARRAY property)
public static RETURNINDEXEDARRAY : Number
Specifies that a sort returns an indexed array as a result of calling the
sort()
or
sortOn()
method. You can use this constant for the
options
parameter in the
sort()
or
sortOn()
method. This provides preview or copy functionality by returning an array that represents the
results of the sort and leaves the original array unmodified.
The value of this constant is 8.
Availability:
ActionScript 1.0; Flash Player 7
See also
sort (Array.sort method)
,
sortOn (Array.sortOn method)
reverse (Array.reverse method)
public reverse() : Void
Reverses the array in place.
Availability:
ActionScript 1.0; Flash Player 5
Example
The following example uses this method to reverse the array
numbers_array
:
var numbers_array:Array = new Array(1, 2, 3, 4, 5, 6);
trace(numbers_array); // Displays 1,2,3,4,5,6.
numbers_array.reverse();
trace(numbers_array); // Displays 6,5,4,3,2,1.
shift (Array.shift method)
public shift() : Object
Removes the first element from an array and returns that element.
Availability:
ActionScript 1.0; Flash Player 5
Returns
Object
- The first element in an array.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...