•
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:
array.sort (Array.NUMERIC | Array.DESCENDING)
Returns
Nothing.
Description
Method; sorts the items in the list in the specified order, using the specified field name. If the
items are a combination of text strings and integers, the integer items are listed first.
fieldName
The
fieldName
value.
This is the fastest way to sort data in a component. It also maintains the component's selection
state. The
sortItemsBy()
The
sortItems()
slower.
Example
The following code sorts the items in the list
the list items:
surnameMenu.sortItemsBy("label", "ASC");
See also
List.sortItems()
List.vPosition
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
listInstance.vPosition
Description
Property; sets the topmost visible item of the list. If you set this property to an index number that
doesn't exist, the list scrolls to the nearest index. The default value is 0.
482
Chapter 6: Components Dictionary
, which returns an integer index array that is the result of the
parameter is usually
"label"
method is fast because it doesn't run any ActionScript while sorting.
method needs to run an ActionScript compare function, and is therefore
or
, but you can specify any primitive data
"data"
in ascending order using the labels of
surnameMenu
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers