getTimer () will return int exactly how many milliseconds since the start of flash memory.
import flash.utils.getTimer; var myInt:int = getTimer() * 0.001;
Now myInt will execute for many seconds until the program is running.
edit: oh, to determine how much time has passed, just save the initial myInt and check it for the current timer.
therefore, when the game begins.
var startTime:int = getTimer();
then every frame or whenever you need to check it.
var currentTime:int = getTimer(); var timeRunning:int = (currentTime - startTime) * 0.001;
Feltope
source share