# Drop down menu(help)::

**URL:** <https://forum.kirupa.com/t/drop-down-menu-help/8065>\
**Category:** Uncategorized\
**Created:** [November 13, 2002, 7:01am UTC](https://forum.kirupa.com/t/drop-down-menu-help/8065 "2002-11-13T07:01:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sub0](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sub0](https://forum.kirupa.com/u/sub0)\
**Post date:** [November 13, 2002, 7:01am UTC](https://forum.kirupa.com/t/drop-down-menu-help/8065/1 "2002-11-13T07:01:42Z")

</div>

Hey,

I have an array for my menu and submenus.  
It works fine, but I have to click again on the menu to close it.When it’s open it’s completly open it takes too much space. Can anyone help me on how I could make a menu close when I click on another menu item…this is the code on the frame on my main timeline:

MenuArray=new array();  
MenuArray[1]=menu1;  
MenuArray[2]=menu2;  
MenuArray[3]=menu3;  
MenuArray[4]=menu4;  
MenuArray[5]=menu5;  
MenuArray[6]=menu6;

offset=new array();  
offset[1]=menu1.\_height;  
offset[2]=menu2.\_height;  
offset[3]=menu3.\_height;  
offset[4]=menu4.\_height;  
offset[5]=menu5.\_height;  
offset[6]=menu6.\_height;

function up(MenuNum) {  
var MenuOff=offset[MenuNum]-10;  
MenuNum++;  
for(i=MenuNum; i\<=6; i++){  
MenuArray\*.\_y-=MenuOff;  
}  
}  
function down(MenuNum) {  
var MenuOff=offset[MenuNum]-10;  
MenuNum++;  
for(i=MenuNum; i\<=6; i++){  
MenuArray\*.\_y+=MenuOff;  
}  
}

These are the 2 events to call the function(for each menu item):

on (release) {  
\_parent.up(1);  
gotoAndStop (“up”);  
}

on (release) {  
\_parent.down(1);  
gotoAndStop (“down”);

}

P.S. I tried the suggestions but nope!!!  
thanks.

:\*(

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 13, 2002, 9:30am UTC](https://forum.kirupa.com/t/drop-down-menu-help/8065/2 "2002-11-13T09:30:52Z")

</div>

I’m thinking about it, but I’m not sure yet. 🙂
