User Guide
ComboBox component 205
Example
The following example specifies that the combo box should have 20 or fewer rows visible:
myComboBox.rowCount = 20;
ComboBox.scroll
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
Usage 1:
on(scroll){
// your code here
}
Usage 2:
listenerObject = new Object();
listenerObject.scroll = function(eventObject){
// your code here
}
comboBoxInstance.addEventListener("scroll", listenerObject)
Event object
Along with the standard event object properties, the scroll event has one additional property,
direction. It is a string with two possible values, "horizontal" or "vertical". For a
ComboBox
scroll event, the value is always "vertical".
Description
Event; broadcast to all registered listeners when the drop-down list is scrolled. This is a List
component event that is available to the ComboBox component.
The first usage example uses an
on() handler and must be attached directly to a ComboBox
instance. The keyword
this, used in an on() handler attached to a component, refers to the
instance. For example, the following code, attached to the ComboBox component instance
myBox, sends “_level0.myBox” to the Output panel:
on(scroll){
trace(this);
}