-
day = new
Array("Sun", "Mon", "Tue" ,"Wed",
"Thu", "Fri", "Sat");
-
function
display(x) {
-
if
(x < 10) {
-
x
= "0"+x;
-
}
-
return
x;
-
}
-
this.onEnterFrame=function()
{
-
time
= new Date();
-
_root.asec._rotation
= 6*time.getSeconds();
-
_root.amin._rotation
= 6*time.getMinutes() + 0.1*time.getSeconds();
-
_root.ahour._rotation
= 30*time.getHours() + 0.5*time.getMinutes();
-
-
_root.txtDate
= time.getFullYear() + "년 " + (time.getMonth()+1)
+ "월 " + time.getDate() + "일";
-
_root.txtDay
= day[time.getDay()];
-
hour
= time.getHours();
-
if
(hour>=13) {
-
hour
= hour-12;
-
_root.sun._visible
= true;
-
_root.moon._visible
= false;
-
}
else {
-
_root.sun._visible
= false;
-
_root.moon._visible
= true;
-
}
-
min
= display(time.getMinutes());
-
sec
= display( time.getSeconds());
-
_root.txtTime
= hour + " : " + min + " : " + sec;
-
}
|