First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Marcos J Pinto | Website: http://

Building the Clock

Before diving into the scripting tha does the real work, you have to build the Movie Clips of the clock's moving parts, that is, the Movie Clip that will contain the drawing of the clock (let's call it Clock) and the three Movie Clips that will contain the drawing of the clock's hands (let's call them Hr, Min and Sec). The movie clips for the clock's hands should have 60 frames each. For the minutes and seconds hands this is pretty obvious, that is, one frame for each position of the hands. The hours hand must have sixty frames too, as its position will also vary depending on the minutes hand.

The movie clips for the clock's hands should have 60 frames each. For the minutes and seconds hands this is pretty obvious, that is, one frame for each position of the hands. The hours hand must have sixty frames too, as its position will also vary depending on the minutes hand.

The Movie Clips for the Hands

The Movie Clips that will contain the hands of the clock will have a very simple structure - just one layer with sixty keyframes, each containing one of the sixty possible positions of the hand.

Now, this is important - so that the clock shows the right time, keyframe number 1 should have the hand pointing to the position of the number twelve (noon), keyframe number two should have the hand pointing to the position of the first minute, and so on, ultil keyframe number sixty, that should point to the position of the 59th minute. The hour pointer should follow exactly the same pattern.


Figure 1: Keyframe 1 must have the hand pointing to the number 12

And also don't forget to insert a Stop action in the first frame of each movie clip, as you don't want your clock's hands to move continuously.

» Level Intermediate

Added: 2000-11-22
Rating: 7.93 Votes: 119
(10 being the highest)
» Author
Marcos J Pinto is a free lance developer and a computer books author in Brazil. His most recent book is a begginers introduction to using Flash 5 (in Portuguese).
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: doc_chin7
» Description:

The flash's horizontal road drive was done in CS4 and was upgraded to CS6. The car responds to right/ left key and flash will auto-generate the movement of roads from left-right or right-left based on random number. Have fun driving in this virtual environment and avoid other cars... :) If you are creative, a road driving game can be created from it.

Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.