MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 812

Components language reference
Table of Contents

Advertisement

Usage
listInstance.sortItemsBy(fieldName, optionsFlag)
listInstance.sortItemsBy(fieldName, order)
Parameters
A string that specifies the name of the field to use for sorting. This value is
fieldName
usually
or
"label"
"data"
A string that specifies whether to sort the items in ascending order (
order
descending order (
"DESC"
Lets you perform multiple sorts of different types on a single array without
optionsFlag
having to replicate the entire array or resort it repeatedly.
The following are possible values for
Array.DESCENDING
Array.CASEINSENSITIVE
, which sorts numerically if the two elements being compared are
Array.NUMERIC
numbers. If they aren't numbers, use a string comparison (which can be case-insensitive if
that flag is specified).
Array.UNIQUESORT
objects in the array are identical or have identical sort fields.
Array.RETURNINDEXEDARRAY
sort. For example, the following array would return the second line of code and the array
would remain unchanged:
["a", "d", "c", "b"]
[0, 3, 2, 1]
You can combine these options into one value. For example, the following code combines
options 3 and 1:
my_array.sort (Array.NUMERIC | Array.DESCENDING)
Returns
Nothing.
808
List component
.
).
optionsFlag
, which sorts from highest to lowest.
, which sorts without regard to case.
, which returns an error code (0) instead of a sorted array if two
, which returns an integer index array that is the result of the
:
) or
"ASC"

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents