private function getTime():void
{
var timer:Timer=new Timer(1000);
timer.addEventListener(TimerEvent.TIMER,showTimer);
timer.start();
}
private function showTimer(event:TimerEvent):void
{
var current:Date = new Date();
txt.text=current.fullYear.toString()+"-"+(current.month+1).toString()+"-"+current.date.toString()+" "+current.hours.toString ()+":"+current.minutes.toString()+":"+current.seconds.toString();
}