![]() ![]() | |
Flash Player 6.0.79.
Flash MX 2004.
listInstance.sortItemsBy(fieldName, order)
fieldName A string that specifies the name of the property to be used for sorting. Typically, this value is "label" or "data".
order A string that specifies whether to sort the items in ascending order ("ASC") or descending order ("DESC").
Nothing.
Method; sorts the items in the list alphabetically or numerically, in the specified order, using the fieldName specified. If the fieldName items are a combination of text strings and integers, the integer items are listed first. The fieldName parameter is usually "label" or "data", but you can specify any primitive data value.
The following code sorts the items in the list surnameMenu in ascending order using the labels of the list items:
surnameMenu.sortItemsBy("label", "ASC");
![]() ![]() | |