I am trying to turn a MovieClip container into a movieclip that hides the menu, except it just doesn’t work. My code is:
Code for the button changing shape and show in screen
displayHM(1);
function displayHM (hOs) :void {
if (hideThatMenu !=null) {
removeChild(hideThatMenu);
}
if (hOs == 1) {
hideThatMenu = new hidemenu();
}else if (hOs ==2) {
hideThatMenu = new showmenu();
}
hideThatMenu.x=126,40;
hideThatMenu.y=59,95;
addChild(hideThatMenu);
}
and the code for the actions of the button
function hidemnu (e:MouseEvent) :void{
if (hOs ==1) {
Tweener.addTween(mmu,{alpha:0, time:1});
Tweener.addTween(botMenu,{alpha:0, time:1});
//displayHM(2);
}else if(hOs == 2) {
Tweener.addTween(mmu,{alpha:1, time:1});
Tweener.addTween(botMenu,{alpha:1, time:1});
displayHM(1);
}
}
Am i doing something wrong?