User Guide

ComboBox component 195
Example
The following code displays the item at index position 4:
trace(myBox.getItemAt(4).label);
ComboBox.itemRollOut
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
Usage 1:
on(itemRollOut){
// your code here
}
Usage 2:
listenerObject = new Object();
listenerObject.itemRollOut = function(eventObject){
// your code here
}
comboBoxInstance.addEventListener("itemRollOut", listenerObject)
Event object
In addition to the standard properties of the event object, the itemRollOut event has an index
property. The index is the number of the item that the pointer rolled out of.
Description
Event; broadcast to all registered listeners when the pointer rolls out of drop-down list items.
This is a List event that is broadcast from a combo box. For more information, see
List.itemRollOut.
The first usage example uses an
on() handler and must be attached directly to a ComboBox
instance. The keyword
this, used inside an on() handler attached to a component, refers to the
component instance. For example, the following code, attached to the ComboBox instance
myBox, sends “_level0.myBox” to the Output panel:
on(itemRollOut){
trace(this);
}