// Define event listener object.
var clearListener:Object = new Object();
clearListener.click = function(evt_obj:Object){
my_cb.removeItemAt(1);
}
// Add Listener.
clear_button.addEventListener("click", clearListener);
See also
ComboBox.removeAll()
ComboBox.replaceItemAt()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
comboBoxInstance.replaceItemAt(index, label[, data])
comboBoxInstance.replaceItemAt(index, {label:label[, data:data]})
comboBoxInstance.replaceItemAt(index, obj);
Parameters
A number 0 or greater that indicates the position at which to insert the item (the
index
index of the new item).
A string that indicates the label for the new item.
label
The data for the item. This parameter is optional.
data
An object with
obj
Returns
Nothing.
Description
Method; replaces the content of the item at the specified index. This is a method of the List
component that is available from the ComboBox component.
,
ComboBox.replaceItemAt()
and
properties.
label
data
ComboBox.replaceItemAt()
193
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers