Hello.
I am new to AS and to this forum. I would like to ask a question (i hope it`s not too stupid).
I have created a menu. I have created a link to each button. Each link brings a sliding page onto the screen. I have created also the sliding out effect.
My problem is that each time I bring out one of the pages, the old one doesn`t disapear.
I made them dissapear, but only when I press the buttons one after another.
I will add the action script I have written, and yes, I know it is wrong, but I don`t know what to do next.
Can someone help me ?
Code:
function b1Over(event:MouseEvent):void{
b1mc.gotoAndPlay(76);
}
function b1Out(event:MouseEvent):void{
b1mc.gotoAndPlay(91);
}
function b1click(event:MouseEvent):void{
MovieClip(root).page_mc.pag1.gotoAndPlay(2);
MovieClip(root).page_mc.pag4.gotoAndPlay(71);
}
b1mc.addEventListener(MouseEvent.ROLL_OVER,b1Over);
b1mc.addEventListener(MouseEvent.ROLL_OUT,b1Out);
b1mc.addEventListener(MouseEvent.CLICK,b1click);
function b2Over(event:MouseEvent):void{
b2mc.gotoAndPlay(86);
}
function b2Out(event:MouseEvent):void{
b2mc.gotoAndPlay(101);
}
function b2click(event:MouseEvent):void{
MovieClip(root).page_mc.pag2.gotoAndPlay(2);
MovieClip(root).page_mc.pag1.gotoAndPlay(71);
}
b2mc.addEventListener(MouseEvent.ROLL_OVER,b2Over);
b2mc.addEventListener(MouseEvent.ROLL_OUT,b2Out);
b2mc.addEventListener(MouseEvent.CLICK,b2click);
function b3Over(event:MouseEvent):void{
b3mc.gotoAndPlay(96);
}
function b3Out(event:MouseEvent):void{
b3mc.gotoAndPlay(111);
}
function b3click(event:MouseEvent):void{
MovieClip(root).page_mc.pag3.gotoAndPlay(2);
MovieClip(root).page_mc.pag2.gotoAndPlay(71);
}
b3mc.addEventListener(MouseEvent.ROLL_OVER,b3Over);
b3mc.addEventListener(MouseEvent.ROLL_OUT,b3Out);
b3mc.addEventListener(MouseEvent.CLICK,b3click);
function b4Over(event:MouseEvent):void{
b4mc.gotoAndPlay(106);
}
function b4Out(event:MouseEvent):void{
b4mc.gotoAndPlay(121);
}
function b4click(event:MouseEvent):void{
MovieClip(root).page_mc.pag4.gotoAndPlay(2);
MovieClip(root).page_mc.pag3.gotoAndPlay(71);
}
b4mc.addEventListener(MouseEvent.ROLL_OVER,b4Over);
b4mc.addEventListener(MouseEvent.ROLL_OUT,b4Out);
b4mc.addEventListener(MouseEvent.CLICK,b4click);