I have a popup text box that I have run it's animation every time a certain button is clicked....and that works. However, when a different button is clicked, that has the same function on it, it won't animate.....and the first button will no longer run it either. I have a trace on the function that shows it is still working, but the animation itself no longer plays.
this part works, but only until a different button is pressed, then it no longer does.
Here is one of the other buttons I want to also run the animation. It has another function as well, and I will include all of it's code, in case I'm overlooking something that's causing it to break.Code:this.popUpAnim_mc.gotoAndPlay("anim"); this.hot_btn.addEventListener(MouseEvent.CLICK, popAnim); function popAnim(myevent:MouseEvent):void{ this.popUpAnim_mc.gotoAndPlay("anim"); trace("popUp animated slide"); }
there are two other buttons that have different functions that I want to also run the animation...but if I can just get one to work, I'm hoping the other two will be easy.Code:Object(this).popUpAnim_mc.PopUp_mc.back_btn.addEventListener (MouseEvent.CLICK, backClick); function backClick (myevent:MouseEvent):void { this.gotoAndStop(currentFrame-1); } //Hide Button on Frame 1 Object(this).popUpAnim_mc.PopUp_mc.back_btn.visible=false; //constantly check current frame to determine if it should be hidden this.addEventListener (Event.ENTER_FRAME, BackButtonVis); function BackButtonVis (event:Event):void{ if(this.currentFrame==1||(currentFrame==totalFrames)){ Object(this).popUpAnim_mc.PopUp_mc.back_btn.visible=false; }else{ Object(this).popUpAnim_mc.PopUp_mc.back_btn.visible=true; } } this.popUpAnim_mc.PopUp_mc.back_btn.addEventListener(MouseEvent.CLICK, popAnim);
Thanks in advance!




Reply With Quote