Numeric (Array.numeric Property); Pop (Array.pop Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

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 :
Represents numeric sorting instead of string-based sorting. String-based sorting, which is the
default setting, treats numbers as strings when sorting them. For example, string-based sorting
places 10 before 3. A numeric sort treats the elements as numbers so that 3 will be placed
before 10. You can use this constant for the
method. The value of this constant is 16.
Availability: ActionScript 1.0; Flash Lite 2.0
See also
sort (Array.sort 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 Lite 2.0
Returns
- The value of the last element in the specified array.
Object
Example
The following code creates the array
removes its last element:
var myPets_array:Array = new Array("cat", "dog", "bird", "fish");
var popped:Object = myPets_array.pop();
trace(popped); // Displays fish.
trace(myPets_array); // Displays cat,dog,bird.
See also
push (Array.push method)
method)
256
ActionScript classes
Number
options
,
sortOn (Array.sortOn method)
myPets_array
,
shift (Array.shift method)
parameter in the
sort()
array containing four elements, and then
,
unshift (Array.unshift
or
sortOn()

Advertisement

Table of Contents
loading

Table of Contents