268
ActionScript classes
unshift (Array.unshift method)
public unshift(value:
Object
) : Number
Adds one or more elements to the beginning of an array and returns the new length of the
array.
Availability:
ActionScript 1.0; Flash Lite 2.0
Parameters
value
:
Object
- One or more numbers, elements, or variables to be inserted at the beginning
of the array.
Returns
Number
- An integer representing the new length of the array.
Example
The following example shows the use of the
Array.unshift()
method:
var pets_array:Array = new Array("dog", "cat", "fish");
trace( pets_array ); // Displays dog,cat,fish.
pets_array.unshift("ferrets", "gophers", "engineers");
trace( pets_array ); // Displays ferrets,gophers,engineers,dog,cat,fish.
See also
pop (Array.pop method)
,
push (Array.push method)
,
shift (Array.shift method)
Boolean
Object
|
+-Boolean
public class
Boolean
extends
Object
The Boolean class is a wrapper object with the same functionality as the standard JavaScript
Boolean object. Use the Boolean class to retrieve the primitive data type or string
representation of a Boolean object.
You must use the constructor new
Boolean()
to create a Boolean object before calling its
methods.
Availability:
ActionScript 1.0; Flash Lite 2.0 - (became a native object in Flash Player 6,
which improved performance significantly)
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...