SUPER RP06
01-25-2006, 12:19 AM
Ok, This is somewhat the same as backlightdesigns's tutorial, but here's my way to create an analog clock
1. Open the Flash application, start with a new one
2. Set the fps, background colour and sizes you want. Leave the timeline alone, until later.
3. Using the oval tool, draw a circle in the centre of the stage
4. Then create 3 movieclips, each named hour hand, minute hand, and second hand
5. In the Second Hand movieclip, click on the line tool, and from the centre (the + thing), draw a line up to a specific height, but to make it fit inside a circle, or you can make the line the same or lesser the radius of the circle
6. Do the same in the minute hand and hour hand movieclip. Remember that the hour hand is shorter than the minute and second hands.
7. Drag the 3 movieclips (the ones you made the hands) to the main stage, and name the instances as the following:
hrs (for the hour hand movieclip)
mint (for the minute hand movieclip)
sec (for the second hand movieclip)
8. Drag the hands so the bottom of the hands is to the centre of the circle. You may have to fiddle a little to make it exactly centred
9. Open up the actions window in the main area and insert the following:
Now = new Date()
h = Now.getHours()%12
m = Now.getMinutes()
s = Now.getSeconds()
hrs._rotation = h*30+(m/2)
mint._rotation = m*6
sec._rotation = s*6
9. Now go to the timeline and insert a blank keyframe in frame 2, and insert the following in frame 2 in the actions window:
gotoAndPlay(1);
That keeps the clock updated, so you have the current time
Now test the movie. If you find any errors, email or PM me right away. You should have an analog clock ticking.
You may add a chime, numbers, or ticks, or make the clock tick every second.
Remember to save your work, and export as flash movie (.swf).
1. Open the Flash application, start with a new one
2. Set the fps, background colour and sizes you want. Leave the timeline alone, until later.
3. Using the oval tool, draw a circle in the centre of the stage
4. Then create 3 movieclips, each named hour hand, minute hand, and second hand
5. In the Second Hand movieclip, click on the line tool, and from the centre (the + thing), draw a line up to a specific height, but to make it fit inside a circle, or you can make the line the same or lesser the radius of the circle
6. Do the same in the minute hand and hour hand movieclip. Remember that the hour hand is shorter than the minute and second hands.
7. Drag the 3 movieclips (the ones you made the hands) to the main stage, and name the instances as the following:
hrs (for the hour hand movieclip)
mint (for the minute hand movieclip)
sec (for the second hand movieclip)
8. Drag the hands so the bottom of the hands is to the centre of the circle. You may have to fiddle a little to make it exactly centred
9. Open up the actions window in the main area and insert the following:
Now = new Date()
h = Now.getHours()%12
m = Now.getMinutes()
s = Now.getSeconds()
hrs._rotation = h*30+(m/2)
mint._rotation = m*6
sec._rotation = s*6
9. Now go to the timeline and insert a blank keyframe in frame 2, and insert the following in frame 2 in the actions window:
gotoAndPlay(1);
That keeps the clock updated, so you have the current time
Now test the movie. If you find any errors, email or PM me right away. You should have an analog clock ticking.
You may add a chime, numbers, or ticks, or make the clock tick every second.
Remember to save your work, and export as flash movie (.swf).