Flash Clock

Flash Analog Clock

This discussion group will teach you how to create an Analog Clock in Flash

Steps to Follow

1. Open a new flash document. Create a clock like below using flash tools.

Clock-flash-tools
image-379

2. Now draw an clock second hand using line tool in new layer and convert into movieclip (F8). Name the movieclip as sec.

Clock-line-tool
image-380

3. Like that create hour and minute hand and convert into movieclip then name it as hrs and mins respectively.

Clock-hour-minute-hand
image-381

4. Now place the second, minute, hour hands  at the center pivot point of the clock as like below.

clock-center-pivot
image-382

5. Totally we have 4 layers.  Create 5th layer for actionscript. Select 5th layer first frame and press F9 and type the below code:

_root.onEnterFrame = function ()
{
a = new Date();
setProperty(“sec”, _rotation, a.getSeconds() * 6);
setProperty(“mins”, _rotation, a.getMinutes() * 6);
setProperty(“hrs”, _rotation, a.getHours() * 30 + a.getMinutes() / 2);
};

Note: This clock run according to the system time.

Click here to download the source Analog Clock

Tags: , , ,

Request a Free SEO Quote