views:

475

answers:

2

Does anyone know of a way to keep a menu open after clicking one of its menu items? I have a custom menu (extended the menu object) it contains a bunch of ‘check’ type menu items, the requirement I am trying to fulfill is to allow the user to click multiple menu items without the menu closing, and then have the menu close when it loses focus, is this possible? If it is can someone please explain how it can be done (pref. with a small example).

Thanks in advance for any help

A: 

You should listen to the itemClick event and call preventDefault() on your menu handler.

private function menuItemClick(evt:MenuEvent):void
{
    // set your checks
    evt.preventDefault();
}
Raul Agrait
A: 

I have the same issue and calling the evt.preventDefault(); method does not solve my problem. Can anybody help me in preventing the menu from closing on menu item click and it should get closed on mouse out event. Please give me a workable code snipet as it is very urgent.

Thanks in advance. Gaurav

Gaurav