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;
}




原文地址:https://www.cnblogs.com/babyhhcsy/p/2842948.html