ComboBox.addItemAt()

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004.

Usage

comboBoxInstance.addItemAt(index, label[, data])

Parameters

index A number 0 or greater that indicates the position at which to insert the item (the index of the new item).

label A string that indicates the label for the new item.

data The data for the item; can be any data type. This parameter is optional.

Returns

The index at which the item was added.

Description

Method; adds a new item to the end of the list at the index specified by the index parameter. Indices greater than ComboBox.length are ignored.

Example

The following code inserts an item at index 3, which is the fourth position in the combo box list (0 is the first position):

myBox.addItemAt(3, "this is the fourth Item");