MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 283

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

}
}
trace ("Unsorted:");
trace (passwords.join());
passwords.sort(order);
trace ("Sorted:");
trace (passwords.join());
The Output panel displays the following results:
Unsorted:
mom:glam,ana:ring,jay:mag,anne:home,regina:silly
Sorted:
ana:ring,anne:home,jay:mag,mom:glam,regina:silly
See also
| (bitwise OR)
Array.sortOn()
Availability
Flash Player 6; additional capabilities added in Flash Player 7.
Usage
my_array.sortOn("fieldName" )
my_array.sortOn("fieldName", option | option |... )
my_array.sortOn( [ "fieldName" , "fieldName" , ... ] )
my_array.sortOn( [ "fieldName" , "fieldName" , ... ] , option | option |... )
Note: Where brackets ([]) are shown, you must include them in the code; that is, the brackets don't
represent optional parameters.
Parameters
A string that identifies a field (in an element of the Array) to be used as the
fieldName
sort value.
One or more numbers or strings, separated by the
option
change the behavior of the sort from the default. The following values are acceptable for
1 or
Array.CASEINSENSITIVE
2 or
Array.DESCENDING
4 or
Array.UNIQUE
8 or
Array.RETURNINDEXEDARRAY
16 or
Array.NUMERIC
Each of these options in discussed in more detail in "Description," below.
,
Array.sortOn()
operator, that
| (bitwise OR)
Array.sortOn()
:
option
283

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Table of Contents