creationComplete="initCollections();">
import mx.events.MenuEvent;
import mx.controls.Alert;
import mx.collections.*;
[Bindable]
public var menuBarCollection:XMLListCollection;
private var menubarXML:XMLList =<>
>
private function initCollections():void {
menuBarCollection = new XMLListCollection(menubarXML);
}
private function rollOverHandler(event:MenuEvent):void {
rollOverTextArea.text = "type: " + event.type + "\n";
rollOverTextArea.text += "target menuBarIndex: " +event.index + "\n";
}
dataProvider="{menuBarCollection}"
itemRollOver="rollOverHandler(event);"/>