Unshift (Array.unshift Method); Boolean - 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

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
- One or more numbers, elements, or variables to be inserted at the beginning
value:Object
of the array.
Returns
- An integer representing the new length of the array.
Number
Example
The following example shows the use of the
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)

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
methods.
Availability: ActionScript 1.0; Flash Lite 2.0 - (became a native object in Flash Player 6,
which improved performance significantly)
268
ActionScript classes
Array.unshift()
,
push (Array.push method)
to create a Boolean object before calling its
Boolean()
method:
,
shift (Array.shift method)

Advertisement

Table of Contents
loading

Table of Contents