![MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference Download Page 265](http://html.mh-extra.com/html/macromedia/flash-8-actionscript-2-0-language/flash-8-actionscript-2-0-language_reference_687537265.webp)
AsBroadcaster
265
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 Player 5
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)
AsBroadcaster
Object
|
+-AsBroadcaster
public class
AsBroadcaster
extends Object
Availability:
ActionScript 1.0; Flash Player 6
NOT
E
A common mistake is to capitalize the second letter of
AsBroadcaster
. When calling the
AsBroadcaster.initialize()
method, ensure that the second letter is lowercase. Any
misspelling of
AsBroadcaster
fails silently.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...