254
ActionScript classes
DESCENDING (Array.DESCENDING property)
public static DESCENDING :
Number
Represents a descending sort order. You can use this constant for the
options
parameter in
the
sort()
or
sortOn()
method. The value of this constant is 2.
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
join()
method.
Availability:
ActionScript 1.0; Flash Lite 2.0
Parameters
delimiter
:
String
[optional] - A character or string that separates array elements in the
returned string. If you omit this parameter, a comma (,) is used as the default separator.
Returns
String
- A 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.
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...