我创建了一个按钮,它将转到一个动画片段。动画片段中有2个按钮。我想让其中一个按钮返回主舞台并恢复我的计时器。
以下是主阶段按钮的代码:
buttonpopup.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_137);
function fl_ClickToGoToAndStopAtFrame_137(event:MouseEvent):void
{
popup2.gotoAndStop(2); // where the popup buttons exist
countdownTimer1.stop();
}
以下是movieclip中按钮的代码:
popupno.popup2.addEventListener(MouseEvent.CLICK, func);
function func(event:MouseEvent):void
{ gotoAndPlay(2); //back to keyframe 2 in main stage
countdownTimer1.start();
}