초침 연속돌기 아날로그 시계 소스 [1]
onSelfEvent (enterFrame, includingFirstFrame) {
time = new Date();
mil = time.getMilliseconds();
s = time.getSeconds();
m = time.getMinutes();
h = time.getHours();
seconds._rotation = s*6+(mil/(1000/6));
minutes._rotation = m*6+(s/10);
hours._rotation = h*30+(m/2);
}
초~ seconds
분~minutes
시~ hours
clock
**********************************************************
똑딱 똑딱 [2]
onSelfEvent (enterFrame, includingFirstFrame) {
myDate = new Date;
hourhand._rotation = myDate.getHours()*30+myDate.getMinutes()/2;
minutehand._rotation = myDate.getMinutes()*6+myDate.getSeconds()/10;
secondhand._rotation = myDate.getSeconds() * 6;
}
초~ secondhand
분~ minutehand
시~ hourhand
hands