03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

This example outputs 1,2,3,4,5 as a result of the trace statement.<br />

See also<br />

split (String.split method), join (Array.join method)<br />

UNIQUESORT (Array.UNIQUESORT property)<br />

public static UNIQUESORT : Number<br />

Represents the unique sorting requirement. You can use this constant for the options<br />

parameter in the sort() or sortOn() method. The unique sorting option aborts the sort if<br />

any two elements or fields being sorted have identical values. The value of this constant is 4.<br />

See also<br />

sort (Array.sort method), sortOn (Array.sortOn method)<br />

unshift (Array.unshift method)<br />

public unshift(value:Object) : Number<br />

Adds one or more elements to the beginning of an array <strong>and</strong> returns the new length of the<br />

array.<br />

Parameters<br />

value:Object - One or more numbers, elements, or variables to be inserted at the beginning<br />

of the array.<br />

Returns<br />

Number - An integer representing the new length of the array.<br />

Example<br />

The following example shows the use of the Array.unshift() method:<br />

var pets_array:Array = new Array("dog", "cat", "fish");<br />

trace( pets_array ); // Displays dog,cat,fish.<br />

pets_array.unshift("ferrets", "gophers", "engineers");<br />

trace( pets_array ); // Displays ferrets,gophers,engineers,dog,cat,fish.<br />

See also<br />

pop (Array.pop method), push (Array.push method), shift (Array.shift method)<br />

250 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!