I have this code to use to pause animations in different areas of a .fla, for each pause I have been copying this and changing the “var timelinePause” and other items as shown after the original code, is repeating this code for each pause just junk code? is there something else from this that I can use to pause?
----ORIGINAL CODE----
this.stop();
var timelinePause:Timer = new Timer(2000, 1);
timelinePause.addEventListener(TimerEvent.TIMER, timerHandler);
timelinePause.start();
function timerHandler(evt:Object):void {
this.play();
}
----FRANKEN-CODE----
this.stop();
var timelinePause2:Timer = new Timer(2000, 1);
timelinePause2.addEventListener(TimerEvent.TIMER, timerHandler);
timelinePause2.start();
function timerHandler2(evt:Object):void {
this.play();
}