User Guide

252 ActionScript classes
//
a,b,undefined,undefined,undefined,undefined,undefined,undefined,undefine
d,c
// if the length property is now set to 5, the array will be truncated
my_array.length = 5;
trace(my_array.length); // my_array.length is updated to 5
trace(my_array); // outputs: a,b,undefined,undefined,undefined
NUMERIC (Array.NUMERIC property)
public static NUMERIC : Number
In the sorting methods, this constant specifies numeric (instead of character-string) sorting.
Including it in the
options parameter causes the sort() and sortOn() methods to sort
numbers as numeric values, not as strings of numeric characters. Without the NUMERIC
constant, sorting treats each array element as a character string and produces the results in
Unicode order.
For example, given the Array of values [2005, 7, 35], if the NUMERIC constant is not
included in the
options parameter, the sorted Array is [2005, 35, 7], but if the NUMERIC
constant is included, the sorted Array is [7, 35, 2005].
Note that this constant only applies to numbers in the array; it does not apply to strings that
contain numeric data (such as ["23", "5"]).
The value of this constant is 16.
Availability: ActionScript 1.0; Flash Player 7
See also
sort (Array.sort method), sortOn (Array.sortOn method)
pop (Array.pop method)
public pop() : Object
Removes the last element from an array and returns the value of that element.
Availability: ActionScript 1.0; Flash Player 5
Returns
Object - The value of the last element in the specified array.