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.
:*(