MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 210

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Returns
Nothing.
Description
Method; sorts the items in the combo box alphabetically or numerically, in the specified order,
using the specified field name. If the
integers, the integer items are listed first. The
, but advanced programmers may specify any primitive value. If you want, you can use the
"data"
parameter to specify a sorting style.
optionsFlag
Example
The following examples are based on a ComboBox instance named
four elements labeled
// First, populate the ComboBox with the elements.
myComboBox.addItem("Bananas");
myComboBox.addItem("Apples");
myComboBox.addItem("cherries");
myComboBox.addItem("Grapes");
// The following statement sorts using the order parameter set to "ASC",
// and results in a sort that places "cherries" at the bottom of the list
// because the sort is case-sensitive.
myDP.sortItemsBy("label", "ASC");
// resulting order: Apples, Bananas, Grapes, cherries
// The following statement sorts using the order parameter set to "DESC",
// and results in a sort that places "cherries" at the top of the list
// because the sort is case-sensitive.
myComboBox.sortItemsBy("label", "DESC");
// resulting order: cherries, Grapes, Bananas, Apples
// The following statement sorts using the optionsFlag parameter set to
// Array.CASEINSENSITIVE. Note that an ascending sort is the default setting.
myComboBox.sortItemsBy("label", Array.CASEINSENSITIVE);
// resulting order: Apples, Bananas, cherries, Grapes
// The following statement sorts using the optionsFlag parameter set to
// Array.CASEINSENSITIVE | Array.DESCENDING.
myComboBox.sortItemsBy("label", Array.CASEINSENSITIVE | Array.DESCENDING);
// resulting order: Grapes, cherries, Bananas, Apples
ComboBox.text
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
210
Chapter 6: Components Dictionary
fieldName
,
"Apples"
"Bananas"
items are a combination of text strings and
parameter is usually
fieldName
,
, and
"cherries"
"Grapes"
or
"label"
, which contains
myComboBox
:

Advertisement

Table of Contents
loading
Need help?

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

This manual is also suitable for:

Flash mx

Table of Contents