I have the Tree and ContextMenu associated with it. When I select menu item
from context menu I cant get Tree's item was right-clicked. How I can get
this Tree's item?
import mx.controls.listClasses.*;
private function createContextMenu():void
{
m = new ContextMenu();
m.hideBuiltInItems();
var customItemsArr:Array = new Array();
var buy:ContextMenuItem = new ContextMenuItem("Detailed");
buy.addEventListener("menuItemSelect", buyHandler);
customItemsArr.push(buy);
m.customItems = customItemsArr;
callTree.contextMenu=m;
}
private function buyHandler(e:ContextMenuEvent):void
{
trace(e.mouseTarget);
trace(ListBaseContentHolder(e.mouseTarget).owner);
trace(ListBaseContentHolder(e.mouseTarget).name);
trace(ListBaseContentHolder(e.mouseTarget).instanceIndex);
}
in traces my trying to catch the Tree's item...