Descending (Array.descending Property); Join (Array.join Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

DESCENDING (Array.DESCENDING property)

public static DESCENDING :
Number
Represents a descending sort order. You can use this constant for the
parameter in
options
the
or
method. The value of this constant is 2.
sort()
sortOn()
Availability: ActionScript 1.0; Flash Lite 2.0
See also
,
sort (Array.sort method)
sortOn (Array.sortOn method)

join (Array.join method)

public join([delimiter:String]) : String
Converts the elements in an array to strings, inserts the specified separator between the
elements, concatenates them, and returns the resulting string. A nested array is always
separated by a comma (,), not by the separator passed to the
method.
join()
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
[optional] - A character or string that separates array elements in the
delimiter:String
returned string. If you omit this parameter, a comma (,) is used as the default separator.
Returns
- A string.
String
Example
The following example creates an array with three elements: Earth, Moon, and Sun. It then
joins the array three times—first by using the default separator (a comma [,] and a space),
then by using a dash (-), and then by using a plus sign (+).
var a_array:Array = new Array("Earth","Moon","Sun")
trace(a_array.join());
// Displays Earth,Moon,Sun.
trace(a_array.join(" - "));
// Displays Earth - Moon - Sun.
trace(a_array.join(" + "));
// Displays Earth + Moon + Sun.
254
ActionScript classes

Advertisement

Table of Contents
loading

Table of Contents