# MenuEvent.MENU\_HIDE (flex3/AS3)

**URL:** <https://forum.kirupa.com/t/menuevent-menu-hide-flex3-as3/277472>\
**Category:** flash\
**Created:** [December 12, 2008, 11:05am UTC](https://forum.kirupa.com/t/menuevent-menu-hide-flex3-as3/277472 "2008-12-12T11:05:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Dude](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@Martin\_Dude](https://forum.kirupa.com/u/Martin_Dude)\
**Post date:** [December 12, 2008, 11:05am UTC](https://forum.kirupa.com/t/menuevent-menu-hide-flex3-as3/277472/1 "2008-12-12T11:05:49Z")

</div>

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?

```auto

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);

```
