flash钟表的实现

钟表的实现

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
var now :Date = new Date();
var hour = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
this.addEventListener(Event.ENTER_FRAME,settime);
function settime(me:Event){
    setNowTime(hour,minutes,seconds);
}
function setNowTime(hour,minutes,second){
//不懂
    h.rotation=(hour*60+minutes)*0.5;
    m.rotation = minutes*6;
    s.rotation = seconds *6;
}

 

 

 





posted @ 2013-01-03 14:42  thero  阅读(184)  评论(0编辑  收藏  举报