Reloading the game clock

Yet another problem with the game clock.

It seems to work fine on the first level of my game but not on the second.

On the first level it either stops the game when the player reaches a certain score or when the time has run out.

On the second level it doesn’t start. I have tryed copying the Start and Done frames but still no luck. I had to rename them as i got an error message.

:s I have changed the code as you will see below but this has thrown up some wierd effects as i am sure you will realise:

onClipEvent (load) {
startlvl2 = getTimer();
startCount = 10;
}
onClipEvent (load) {
if (_root.gameComplete == true) {
_root.gotoAndStop(“donelvl2”);
} else {
current = (getTimer()-start)/1000;
elapsed = startCount-current;
_root.counterlvl2 = Math.floor(elapsed);
if (_root.counterlvl2<=0) {
_root.gotoAndStop(“donelvl2”);
}
}
}

It seems to start the clock before the level starts and stops it just after.

Any advice much appriciated :slight_smile: