To create an analog clock in FlashMX 2004 you must first install FlashMX 2004 in your system.
The next step is to create the background for the clock. The background can be created in flash itself or can be imported from fireworks or Photoshop after creating it.
Then you must insert three layers in the time line window and name the layers as interface, sec, min, hour, and actions as shown below in the timeline window:
If you have created the background design in Photoshop or fireworks, import it into your interface layer.
Click on OK.
Then you must draw a line in the sec layer and convert it into symbol by pressing F8 and name it as sec_mc and then Movie clip behavior option is chosen and the bottom center square in registration is selected in the Symbol windows and click ok.
Then place the sec_mc at the center of the clock background of the sec layer and in the instance text box of the property window name it as "sec" and it can be used as seconds needle.
Then drag the sec_mc into the min layer from the library and to open Library window press Ctrl+L. Reduce the height of sec_mc approx by 3pix and you must place it at the center of the clock background design. And this needle can be used as the minutes hand.
And the sec_mc is dragged into the hour layer from the library and the height must be reduced by 6pix and it must be placed at the center of the clock background design and assign a name to it as "hour" in the instance text box from the property window. This is used as the Hours needle.
The following code must be copied to the actions window of actions layer:
time=new Date(); // time object
seconds = time.getSeconds()
minutes = time.getMinutes()
hours = time.getHours()
hours = hours + (minutes/60);
seconds = seconds*6; // calculating seconds
minutes = minutes*6; // calculating minutes
hours = hours*30; // calculating hours
sec._rotation=seconds; // giving rotation property
min._rotation=minutes; // giving rotation property
hour._rotation=hours; // giving rotation property
Then press F5 to insert new frame in the second frame of each layer.
You are done! The clock is ready to start now! Press Ctrl+Enter
to view the clock.