I have a menubar in my Flex 3 application and am trying to create another application to administer this menu system. Part of this is to be able to modify submenus so i need a way to capture when a submenu is clicked (I can get all the other menus with an itemclick event handler). According to the documentation:
======================================================================== itemClick (MenuEvent.ITEM_CLICK) Dispatched when a user selects an enabled menu item of type normal, check, or radio. This event is not dispatched when a user selects a menu item of type separator, a menu item that opens a submenu, or a disabled menu item. ======================================================================== What I need is a way to capture a click on a menu item that opens a submenu. Now, I have figured one way to do it (And it works) and that is to add eventlisteners to each menu for rolloverevent and clickevent. When a menu is rolled over, the menu item is checked to see if its data is "top" and if so, a string variable is set to the menu item label; If not then the same string variable is set to an empty string. Then, if a menu item is clicked, the clickevent handler checks to see if the length of that string variable is greater than 0. If it is, then hey presto, the user must have clicked on a submenu. This seems like a very kludgy way to do this and I was wondering if there is a better way to do it.

