发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
private var scoutTime:Timer=new Timer(10000000,1);//闹钟计时器
private function scout() {
scoutTime.stop();
var curtime:Date=new Date();
var curHour:Number=curtime.getHours();
var curMinute:Number=curtime.getMinutes();
var curSecond:Number=curtime.getSeconds();
var desHour:Number=Number(_desHour);
var desMinute:Number=Number(_desMinute);
var desSecond:Number=0;
var step:Number;//时间差值-毫秒
if(curSecond>desSecond){
desSecond+=60;
desMinute-=1;
}
if(curMinute>desMinute){
desMinute+=60;
desHour-=1;
}
if(curHour>desHour){
desHour+=24;
}
step=(desHour-curHour)*60*60*1000+(desMinute-curMinute)*60*1000+(desSecond-curSecond)*1000;
//trace(step);
scoutTime=new Timer(step,1);
scoutTime.addEventListener(TimerEvent.TIMER,timeover);
scoutTime.start();
}
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。