var total_time:int = 10 * 1000;
var time_base:int;
var micro_seconds:int;
var myTimer:Timer = new Timer(100);
myTimer.addEventListener(TimerEvent.TIMER, myTimerFunc);
timerStart();
function myTimerFunc(event:TimerEvent) {
	micro_seconds = total_time - (getTimer() - time_base);
	var secondUsed:int = micro_seconds / 1000;
	if ( micro_seconds <= 0 ) {
		myTimer.stop();
		timer_txt.text = String(secondUsed);
		myTimer.removeEventListener(TimerEvent.TIMER, myTimerFunc);
	} else {
		timer_txt.text = String(secondUsed);
	}
}
function timerStart() {
	time_base = getTimer();
	myTimer.start();
}