MenuEvent.MENU_HIDE (flex3/AS3)

I am using this trigger to decide when to move some elements in my Flex project. The only thing is that it also trigger when a submenu hides (why?!). Is there any way to target it in a way that it will only trigger when the whole menu / mainMenu hides?


protected var mainMenu:Menu;
mainMenu.name="mainMenu";
mainMenu.labelField="@name";
mainMenu.iconField="@typeId";
this.mainMenu = Menu.createMenu(null, mainMenuData, false);
this.mainMenu.addEventListener(MenuEvent.MENU_SHOW, this.openOrClose);
this.mainMenu.addEventListener(MenuEvent.MENU_HIDE, this.closeMenu);