Items in a combo box list are indexed by position, starting with the number 0. An item can be
one of the following:
A primitive data type.
An object that contains a
An object may use the
determine the
If the item is a primitive data type other than String, it is converted to a string. If an item is an
object, the
property must be a string and the
label
value.
ComboBox methods to which you supply items have two parameters,
refer to the properties above. Methods that return an item return it as an object.
A combo box defers the instantiation of its drop-down list until a user interacts with it.
Therefore, a combo box may appear to respond slowly on first use.
Use the following code to programmatically access the ComboBox component's drop-down
list and override the delay:
var foo = myComboBox.dropdown;
Accessing the pop-up list may cause a pause in the application. This may occur when the user
first interacts with the combo box, or when the above code runs.
Method summary for the ComboBox class
The following table lists methods of the ComboBox class.
Method
ComboBox.addItem()
ComboBox.addItemAt()
ComboBox.close()
ComboBox.getItemAt()
ComboBox.open()
ComboBox.removeAll()
ComboBox.removeItemAt()
ComboBox.replaceItemAt()
ComboBox.sortItems()
ComboBox.sortItemsBy()
166
ComboBox component
property and a
label
ComboBox.labelFunction
property.
label
Description
Adds an item to the end of the list.
Adds an item to the end of the list at the specified index.
Closes the drop-down list.
Returns the item at the specified index.
Opens the drop-down list.
Removes all items in the list.
Removes an item from the list at the specified location.
Replaces the content of the item at the specified index.
Sorts the list using a compare function.
Sorts the list using a field of each item.
property
data
or
ComboBox.labelField
property can be any ActionScript
data
label
property to
and
, that
data
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?