how to build an analog clock
// START OF .AS
time=new Date(); // time object
seconds = time.getSeconds()
minutes = time.getMinutes()
hours = time.getHours()
hours = hours + (minutes/60);
seconds = seconds*6; // calculates seconds
minutes = minutes*6; // calculates minutes
hours = hours*30; // calculates hours
sec._rotation=seconds; // gives rotation
min._rotation=minutes; // gives rotation
hour._rotation=hours; // gives rotation
// END OF .AS
So, that is all there is to it.
With any luck at all, your analog clock should be up and running.

0 Comments:
Post a Comment
<< Home