F > FComboBox.getSelectedIndex

 

FComboBox.getSelectedIndex

Availability

Flash Player 6.

Usage

myComboBox.getSelectedIndex()

Parameters

None.

Returns

An integer or undefined.

Description

Method; returns the index of the item currently selected in the combo box, or returns undefined if no item is selected.

Items are listed in the combo box from top to bottom using a zero-based index.

Example

The following code retrieves the index of the item currently selected in toyList and stores it in the variable selIndex.

var selIndex = toyList.getSelectedIndex();

See also

FComboBox.setSelectedIndex