I figured it out... I extended the menubar
package components {
import mx.controls.MenuBar;
import flash.events.MouseEvent;
import mx.events.MenuEvent;
import mx.controls.menuClasses.IMenuBarItemRenderer;;
public class menuBar extends mx.controls.MenuBar{
public function init():void{
this.addEventListener(MouseEvent.MOUSE_DOWN,
mouseDownHandler);
}
private function mouseDownHandler
(event:MouseEvent):void
{
if(event.target.className == "MenuBarItem"){
var item:IMenuBarItemRenderer =
IMenuBarItemRenderer(event.target);
var index:int = item.menuBarItemIndex;
if (item.enabled && [EMAIL PROTECTED] != ""){
var click:MenuEvent = new
MenuEvent(MenuEvent.ITEM_CLICK);
click.index = index;
click.menuBar = this;
click.label = itemToLabel(item.data);
click.item = item.data;
click.itemRenderer = item;
dispatchEvent(click);
}
}
}
}
}
--- In [email protected], "gustavo.saume"
<[EMAIL PROTECTED]> wrote:
>
>
> Hi Devin,
>
> the itemClickEvent only works on the items of the subMenus....
> you could set an clickEvent on the menuBar and check the target, if
> it's a MenuBarItem so you could get the data property with the XML.
>
> HTH
>
> Gus
> CINet Consult
>