ComboBox.getItemAt()

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

comboBoxInstance.getItemAt(index)

Parameters

index The index of the item to retrieve. The index must be a number greater than or equal to 0, and less than the value of ComboBox.length.

Returns

The indexed item object or value. The value is undefined if the index is out of range.

Description

Method; retrieves the item at a specified index.

Example

With a ComboBox component instance my_cb on the Stage, the following ActionScript displays the label for the first combo box item in the Output panel:

//Add Item to List.
my_cb.addItem({data:1, label:"First Item"});
my_cb.addItem({data:2, label:"Second Item"});

trace(my_cb.getItemAt(1).label);