пример таймера с запуском и остановкой:

Код:
Timer = function(start){
this.reset(start);
}
Timer.prototype.start = function(){
if (this._pauseTime){
this._startTime += getTimer() - this._pauseTime;
this._pauseTime = 0;
}else{
this.reset(true);
}
}
Timer.prototype.stop = function(){
if (!this._pauseTime) this._pauseTime = getTimer();
}
Timer.prototype.reset = function(restart){
this._startTime = getTimer();
if (!this._startTime) this._startTime = 1;
if (restart) this._pauseTime = 0;
else this._pauseTime = this._startTime;
}
Timer.prototype.getTime = function(){
if (this._pauseTime) return this._pauseTime - this._startTime;
var gotTime = getTimer();
if (!gotTime) gotTime = 1;
return gotTime - this._startTime;
}
Timer.prototype.setTime = function(t){
this._startTime = getTimer() - t;
}
Timer.prototype.addProperty("time",Timer.prototype.getTime,Timer.prototype.setTime);
Timer.prototype.getPaused = function(){
return (this._pauseTime) ? true : false;
}
Timer.prototype.setPaused = function(p){
if (p == Boolean(this._pauseTime)) return false;
if (p) this.stop();
else this.start();
}
Timer.prototype.addProperty("paused",Timer.prototype.getPaused,Timer.prototype.setPaused);
function formatTime(milliseconds){
var centiseconds = Math.floor(milliseconds/10);
var seconds = Math.floor(centiseconds/100);
var minutes = Math.floor(seconds/60);
centiseconds %= 0;
seconds %= 60;
minutes %= 60;
if (centiseconds < 10) centiseconds = "0" + centiseconds;
if (seconds < 10) seconds = "0" + seconds;
if (minutes < 10) minutes = "0" + minutes;
return minutes +":"+ seconds +""+ centiseconds;
}
var clock_timer = new Timer();
clock_timer.start();
this.onEnterFrame = function(){
display_txt.text = formatTime(clock_timer.time);
}
stop_btn.onRelease = function(){
clock_timer.stop();
}
play_btn.onRelease = function(){
if (clock_timer.paused) clock_timer.start(); // only start if paused
}
display_txt - имя текстового поля