layout="absolute">
import mx.controls.Menu;
import mx.events.MenuEvent;
private function createAndShow():void {
var myMenu:Menu = Menu.createMenu(null, myMenuData, false);
myMenu.labelField="@label"
myMenu.addEventListener(MenuEvent.ITEM_CLICK,itemClickInfo);
myMenu.show(225, 10);
}
private function itemClickInfo(event:MenuEvent):void {
ta1.text="event.type: " + event.type;
ta1.text+="\nevent.index: " + event.index;
ta1.text+="\nItem label: " + event.item.@label
ta1.text+="\nItem selected: " + event.item.@toggled;
ta1.text+= "\nItem type: " + event.item.@type;
}