Im using a mx:MenuBar component with xml data to bring a menu. The basic behaviour as I see is, initially on clicking the top level menu item (i.e on the horizontal bar), the pop-up sub menu opens. Then without clicking anywhere, if I mouse over / roll over on the horizontal menu bar, the pop-up sub menus of the other top level menus opens up.
This behaviour seems to be inconsistent. The pop-up sub menus should open either on click of any top level menu item (horizontal menu bar) or only on mouse over / roll over of the menu bar items.
I want the pop-up submenus to open only on click of the top level menu (horizontal menu bar). So I added event handlers for mouseOver as well as rollOver events (don't know which event actually gets generated on hovering over the horizontal menu bar). In the event handlers, I called the event.preventDefault() method to prevent the default behaviour(i.e opening of pop-up sub menus). But, nothing works. I felt like, I don't have control over it.
Could anyone say how to suppress the default behaviour and open the pop-up submenus only on click event of the menu bar.