Advanced Scripts


Useful scripts for non-time based timers

This action can be used on a button to stop the timer:

on(release) {
   myCounter.stopTimer();
}

This action starts the timer from the position that it was last stopped:

on(release) {
   myCounter.startTimer();
}

This action pauses the timer while it continues to count in the background. Like a lap timer on a stop watch:

on(release) {
   myCounter.pauseTimer();
}

This action releases the timer after pausing it using pauseTimer:

on(release) {
   myCounter.releaseTimer();
}

This action resets the timer to start counting from the beginning:

on(release) {
   myCounter.resetTimer();
}


Please see the full ActionScript reference for more commands.

 

Useful scripts for time based timers

 

onStartCounter
This event is called when the timer starts counting. It will also be called if the movie is entered again after the timer has already started counting. This event is only called if the timer has been set for a delayed start.

myCounter.onStartCounter = function() {
    loadMovie("movie1.swf", "_level1");
};

getCurrentDate
Returns the current date and time as set in the timer properties

trace(myCounter.getCurrentDate());

getCounterText
Returns the text that appears in the timer's textfield

trace(myCounter.getCounterText());

 

Please see the full ActionScript reference for more commands.