This tutorial will teach you how to create an Analog Clock in Flash MX 2004. The free download .fla file is also included at the end of the tutorial.
STEPS TO FOLLOW
- Create a background for your clock, You can either draw it in fireworks or photoshop and import it onto your stage or draw it in flash itself.
- Add 5 Layers in your Timeline window.
Name them - interface, sec, min, hour and actions. Similar to the Timeline window shown below.
- Import your clock background design into your interface Layer if you had created it else where.
- Draw a line in your sec Layer. Select the line and press F8 to convert it to Symbol. Call this Symbol sec_mc, choose Movie clip behavior and select the bottom center square in registration. Similar to the Symbol window shown below.
- In your sec Layer, place sec_mc right at the center of your clock background design. Name it "sec" in instance text box of your property window. This is going to be your seconds needle.
- Drag sec_mc into your min Layer from your library. If your library window is not open, press (Ctrl+L) to open it. Reduce sec_mc's height, may be by 3pix. Place it right at the center of your clock background design. Name it "min" in instance text box of your property window. This is going to be your minutes needle.
- Drag sec_mc into your hour Layer from your library. Reduce its height, may be by 5 to 6pix. Place it right at the center of your clock background design. Name it "hour" in instance text box of your property window. This is going to be your Hours needle.
- Copy and Paste the code given below in your actions window of actions Layer.
- Now go to second frame of each layer and press F5 to insert new frame.
Your clock is ready. Press Ctrl+Enter to view your clock.