F > FComboBox.getItemAt

 

FComboBox.getItemAt

Availability

Flash Player 6.

Usage

myComboBox.getItemAt(index)

Parameters

index An integer specifying the position of an item in the combo box.

Returns

An object.

Description

Method; returns the item at the specified index as an object with the properties label and data.

The ComboBox component uses a zero-based index, where the item at index 0 is displayed at the top of the list.

Example

The following code returns the label of the item at index 4 in comboBox1 as a string.

trace(comboBox1.getItemAt(4).label);

The following code returns the data associated with the item at index 4 in comboBox2. The return value depends on the type of data, and may be an object, string, movie clip reference, or other value.

trace(comboBox2.getItemAt(4).data);

The following code returns an object containing the label and the data value associated with the item at index 4 in comboBox3.

trace(comboBox3.getItemAt(4));

See also

FComboBox.getSelectedItem