03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

toString (Array.toString method)<br />

public toString() : String<br />

Returns a string value representing the elements in the specified Array object. Every element<br />

in the array, starting with index 0 <strong>and</strong> ending with the highest index, is converted to a<br />

concatenated string <strong>and</strong> separated by commas. To specify a custom separator, use the<br />

Array.join() method.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 5<br />

Returns<br />

String - A string.<br />

Example<br />

The following example creates my_array <strong>and</strong> converts it to a string.<br />

var my_array:Array = new Array();<br />

my_array[0] = 1;<br />

my_array[1] = 2;<br />

my_array[2] = 3;<br />

my_array[3] = 4;<br />

my_array[4] = 5;<br />

trace(my_array.toString()); // Displays 1,2,3,4,5.<br />

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 />

In the sorting methods, this constant specifies the unique sorting requirement. You can use<br />

this constant for the options parameter in the sort() or sortOn() method. The unique<br />

sorting option aborts the sort if any two elements or fields being sorted have identical values.<br />

The value of this constant is 4.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 7<br />

See also<br />

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

270 <strong>ActionScript</strong> classes

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

Saved successfully!

Ooh no, something went wrong!