User Guide
ComboBox.scroll 197
Example
With a ComboBox component instance my_cb, the following ActionScript sets the combo
box to show the first three items, and add a scrollbar to see the fourth:
// Add Items to List.
my_cb.addItem({data:1, label:"First Item"});
my_cb.addItem({data:2, label:"Second Item"});
my_cb.addItem({data:3, label:"Third Item"});
my_cb.addItem({data:4, label:"Fourth Item"});
// Display scroll bar if ComboBox has more than 3 items.
my_cb.rowCount = 3;
ComboBox.scroll
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
var listenerObject:Object = new Object();
listenerObject.scroll = function(eventObject:Object) {
// 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.