User Guide

List component 469
Example
The following example sends a message to the Output panel that indicates which item index
number has been rolled over:
form.itemRollOut = function (eventObj) {
trace("Item #" + eventObj.index + " has been rolled out.");
}
myList.addEventListener("itemRollOut", form);
See also
List.itemRollOver
List.itemRollOver
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
Usage 1:
on(itemRollOver){
// your code here
}
Usage 2:
listenerObject = new Object();
listenerObject.itemRollOver = function(eventObject){
// your code here
}
listInstance.addEventListener("itemRollOver", listenerObject)
Event object
In addition to the standard properties of the event object, the itemRollOver event has an index
property that specifies the number of the item that was rolled over.
Description
Event; broadcast to all registered listeners when the list items are rolled over.
The first usage example uses an
on() handler and must be attached directly to a List 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 List instance
myList, sends
“_level0.myList” to the Output panel:
on(itemRollOver){
trace(this);
}