Newsletter: Learn More ||| Multimedia Presentation Software |||
Flash Clock
Introduction
What is the time now? Here is the electronic clock that works on general math formulas for rotation. As we know, each hand of a watch rotates 360° at different intervals. For:

The second hand:
takes 60 intervals to rotate 360°. So,
intervals = 3600 / 60
The minute hand:
takes 60 intervals to make 360°. So,
intervals = 360 / 60
The hour hand:
takes 12 intervals to make 360°. So,
intervals = 360 / 12
Contents Download File
Step One
Create a movie clip and draw a line perpendicular to the center for the mc(movie clip) and give a name "sec":
Step Two

Create two more clips for "min" and "hour" with varying size for the particular hands.

Step Three
Create one more mc(time) and drag the three mc(sec, min, hour) so that their centers coincide like the hands of a clock.
Step Four

Give an instance name for the particular clips (sec, min, hour) in separate layer.

Step Five
Create a new layer on the top & copy the code below:

time=new Date(); // time object
seconds=(time.getSeconds())*6; // calculating seconds
minutes=(time.getMinutes())*6; // calculating minutes
hours=(time.getHours())*30; // calculating hours
sec._rotation=seconds; // giving rotation property
min._rotation=minutes;
hour._rotation=hours;

Final Note
Note: this clock works on your system time.
This article was first published by www.internetcross.com.
 
©2007 Wildform, Inc | Policies | Contact Us | Newsletter Options
 
©2010 Wildform, Inc | Policies | Contact Us | Newsletter Options
 
Wildform provides a 100% satisfaction guarantee on all our Flash software. If you are not completely satisfied with our Flash multimedia software for any reason you may request a refund within 15 days of purchase.