AS3.0获取系统当前时间

来源:互联网 发布:1元夺宝源码 编辑:程序博客网 时间:2024/03/29 16:48
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();   }


 

原创粉丝点击