ComboBox.selectedIndex

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004.

Usage

myComboBox.selectedIndex

Description

Property; the index (number) of the selected item in the drop-down list. The default value is 0. Assigning this property clears the current selection, selects the indicated item, and displays that label of the indicated item in the combo box's text box.

Assigning a selectedIndex that is out of range is ignored. Entering text into the text field of an editable combo box sets selectedIndex to undefined.

Example

The following selects the last item in the list:

myComboBox.selectedIndex = myComboBox.length-1;

See also

ComboBox.selectedItem