ahref.com > Guides > Design
Macromedia Flash Tutorial, Continued
Putting it All Together
To make this timer completely modular we are going to create a Movie Clip
named "Clock." Start by clearing the stage, or canvas. Now open up the
library and drag each of the Movie Clips you created onto the Clock's
stage.
Physically line up 1 Second, 10 Seconds, 1 Minute, 10 Minutes, and 1 Hour
(the digit for each of these should be zero). Then drag One Second Delay
onto the canvas. Note, it has no graphic and will be blank, but Flash uses
a small white circle as a marker. Each copy of a symbol when placed on the
stage is a unique Instance. The Instance name, not the name of the master
Movie Clip in the library, is the name used in Tell Targets. Double click
each Movie Clip, select Definition and enter the correct Instance name:
1 Second Delay - Delay
1 Second - 1Second
10 Seconds - 10Second
1 Minute - 1Minute
10 Minutes - 10Minutes
1 Hour - 1Hour
Go back to the Main Timeline/Stage and Drag the Clock Movie Clip on to the
stage. Double click its white marker and give it an Instance name of
"Clock."
Select Control > Test Movie and the Timer should start and run.
In Part 2 of this Flash tutorial (to be published later this summer), we'll cover how to add the Start, Stop,
and Reset buttons. Then we will convert the timer to an accurate Clock (one
that uses the time from your server or the user's computer) and include a
more detailed explanation of how the timer works.
John Croteau, a recognized expert in Flash creation, has been involved in Flash since the release of the beta for Flash 2. His Flash Tech Resource, now a
part of Flash Central, is a useful technical information resource for Flash developers.
|