Hi
Lets say we have the following code in Main.as
package {
import flash.display.Sprite;
import Player;
public class Main extends Sprite {
public function Main() {
public var deltaTime:uint;
private var objPlayer:Player = new Player();
}
}
}
and the Player.as contains
package {
import flash.display.Sprite;
public class Player extends Sprite {
public function Player() {
x += 10*deltaTime;
}
}
}
But how do I access the deltaTime variable from Player function/Method?
I have tried root.Main.deltaTime and more, but no one seems to work.
Thanks in advance