Timed scene switch event doesn't switch to the right scene
Basically I have a timer, and after one second it's supposed to change scenes to the scene named "Transport"
MovieClip(this.root).gotoAndPlay(1, "Transport");
But it's not working. It keeps changing back to the scene I already was on. What am I doing wrong?
| Header 1 |
|---|
//Transport import flash.events.TimerEvent; import flash.utils.Timer; var timer:Timer = new Timer(1000, 1); timer.addEventListener(TimerEvent.TIMER, fl_ClickToGoToScene_14); Transport.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_2); function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void { timer.start(); gotoAndPlay(29); } function fl_ClickToGoToScene_14(event:TimerEvent):void { timer.stop(); MovieClip(this.root).gotoAndPlay(1, "Transport"); } |
