ok i have a game that runs on a linear timeline in that certain events are triggered by the amount of time passed in the game, for example if clock == 100, the trigger Super Boss etc etc,
lastTime = getTimer();
function mainTime(evt:Event){
timeDiff = getTimer()-lastTime;
lastTime+=timeDiff;
var clockTime:Number = timeDiff/1000;
}
no too bad right, however at a certain point I would like to pause all events to add a special event, then at I would like to re add the eventListener and have “clockTime” resume where it left off, does that make sense,
I am able to effectively remove the EL and add it back, however, the ‘clockTime’ continues to add even when EL is remove, this makes sense of course, since ‘lastTime’ was initialized at the beginning of the game,
my question is how do i halt ‘clockTime’ from ticking when pausing the game?