11:41 am Buenos Dias onClipEvent (enterFrame) {
// Gets the time information and stores in MyDate
MyDate = new Date();
// Assigns values individually
hour = MyDate.getHours();
minute = MyDate.getMinutes();
second = MyDate.getSeconds();
// Calculates position for hours hand
if (hour > 11) {
hour = hour-12;
}
hour = hour*5;
movement = minute/12;
hour = int(hour+movement);
// Moves hours hand
with (_root.Clock.Hours) {
gotoAndStop(hour) + 1;
}
// Moves minutes hand
with (_root.Clock.Minutes) {
gotoAndStop(minute) + 1;
}
// Moves seconds hand
with (_root.Clock.Seconds) {
gotoAndStop(second) + 1;
}
}
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment