Newsletter: Learn More ||| Multimedia Presentation Software |||

« Video: How Tsunamis Are Born | Main | Get serious about fun »

How to Make a Flash Clock

What is the time now? Here's 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




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;

NOTE

Note: this clock works on your system time.

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Please enter the security code:



 
©2007 Wildform, Inc | Policies | Contact Us | Newsletter Options
 
Wildform provides a 100% satisfaction guarantee on all our software. If you are not completely satisfied with our software for any reason you may request a refund within 15 days of purchase.