Array.unshift() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Array.unshift()

Availability
Flash Player 5.
Usage
my_array.unshift(value1:Object,value2,...valueN) : Number
Parameters
value1,...valueN
beginning of the array.
Returns
An integer representing the new length of the array.
Description
Method; adds one or more elements to the beginning of an array and returns the array's
new length.
Example
The following example shows the use of
var pets_array:Array = new Array("dog", "cat", "fish");
trace( pets_array ); // dog,cat,fish
pets_array.unshift("ferrets", "gophers", "engineers");
trace( pets_array ); // ferrets,gophers,engineers,dog,cat,fish
124
Chapter 2: ActionScript Language Reference
One or more numbers, elements, or variables to be inserted at the
Array.unshift()
:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash mx

Table of Contents