Wednesday, April 7, 2010

Clock in Flex

Hi The way you want to develop digital clock in flex is
private var timer:Timer;

private function init():void {
this.timer = new Timer(1000);
this.timer.addEventListener(TimerEvent.TIMER, this.resetNow);
this.timer.start();
}


private function resetNow(event:TimerEvent):void {
this.clock.text = new Date().toLocaleTimeString();
}

]]>