Hey Guys!
Got a problem with the timeline / currentFrame at the moment.
Im calling a function to change frames when a player gets to a certain part of the frame, which works fine for changing from frame 1 to frame 2… but when he gets to frame 2, it kinda “forgets” what frame the player is on!
Code:
Document Class (important bits):
public function playGame(event:MouseEvent):void {
gotoAndStop(1, "Scene 2");
var link:Link = new Link(stage);
}
}
public static function get instance():Zelda_Main {
return _instance;
}
}
External Class (Important bits):
public function frameTest() {
if(link.currentFrame == 1) {
if(link.x >= 750) {
//traceDisplayList(swfStage);
//var main:Object = Zelda_Main;
//trace(main.frameChanger(1));
Zelda_Main.instance.frameChanger(2);
}
}
*PART ABOVE WORKS FINE!!!*
*BELOW: NOT WORKING!*
if(link.currentFrame == 2) {
trace("HELLO");
}
Thanks guys.