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.

trace(x_array[0]); // a<br />

trace(x_array[1]); // b<br />

trace(x_array[2]); // c<br />

trace(x_array[3]); // 1<br />

trace(x_array[4]); // 2, 3<br />

trace(x_array[5]); // 4<br />

DESCENDING (Array.DESCENDING property)<br />

public static DESCENDING : Number<br />

Represents a descending sort order. You can use this constant for the options parameter in<br />

the sort() or sortOn() method. The value of this constant is 2.<br />

See also<br />

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

join (Array.join method)<br />

public join([delimiter:String]) : String<br />

Converts the elements in an array to strings, inserts the specified separator between the<br />

elements, concatenates them, <strong>and</strong> returns the resulting string. A nested array is always<br />

separated by a comma (,), not by the separator passed to the join() method.<br />

Parameters<br />

delimiter:String [optional] - A character or string that separates array elements in the<br />

returned string. If you omit this parameter, a comma (,) is used as the default separator.<br />

Returns<br />

String - A string.<br />

Example<br />

The following example creates an array with three elements: Earth, Moon, <strong>and</strong> Sun. It then<br />

joins the array three times—first by using the default separator (a comma [,] <strong>and</strong> a space),<br />

then by using a dash (-), <strong>and</strong> then by using a plus sign (+).<br />

var a_array:Array = new Array("Earth","Moon","Sun")<br />

trace(a_array.join());<br />

// Displays Earth,Moon,Sun.<br />

trace(a_array.join(" - "));<br />

// Displays Earth - Moon - Sun.<br />

trace(a_array.join(" + "));<br />

// Displays Earth + Moon + Sun.<br />

Array 237

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

Saved successfully!

Ooh no, something went wrong!