Question
how do I get a replay button to work?
Hey everybody I can't figure out how to get my relay button
to work. The effect that I want is for the timeline to play through
and then a replay button appears at the end and on click you can
replay the scene.
I have a button called replayBtn with an instance name of replay_btn.
In the actions layer I have this on the last frame-
stop();
function startOver(event:MouseEvent):void {
gotoAndPlay(1);
}
replay_btn.addEventListener(MouseEvent.CLICK, startOver);
But I still cannot get it to work.
Thanks
I have a button called replayBtn with an instance name of replay_btn.
In the actions layer I have this on the last frame-
stop();
function startOver(event:MouseEvent):void {
gotoAndPlay(1);
}
replay_btn.addEventListener(MouseEvent.CLICK, startOver);
But I still cannot get it to work.
Thanks
