ahref.com > Guides > Design
Macromedia Flash Tutorial, Continued
Adding Animation
After all of the numbers (0-9) have been created, we need to create a Movie
Clip for each unit of time in the timer (tens of seconds, seconds, minutes,
tens of minutes, and hours). Or in other words, for every digit that the
clock displays, we need to create a Movie Clip.
Movie Clips are a new feature of Flash 3. A Movie Clip has its own timeline
which can run independently of the main timeline. When a Movie Clip is
placed on the main timeline, it will begin to play when the movie gets to
the frame it is in. The Movie Clip can continue to run even if the main
timeline is stopped.
We'll start this example with seconds. First, create a new symbol and name
it "1 Second." Make sure the behavior is set to Movie Clip. Insert a new
layer, then open the library. Drag a copy of Numbers onto the stage. Then
go to frame 11, click the right mouse button, and select Insert Frame.
When you've done that, click the right mouse button and select Insert Blank
Keyframe.
Now go back to the first layer of your 1 Second symbol. Go to frame 11 of
that layer and highlight frames 1 to 11. Click the right mouse button and
select Insert Blank Keyframe. In frame 1, assign a frame action of Stop (to
do this, click the right mouse button and select Properties > Actions > +
and select Stop from the drop down list).
Go to each Blank Keyframe in frames 1 through 10 and add a label (0-9). To
do this, select each frame and then click the right mouse button, then
choose Properties > Label. The labels should match up with the numbers
displayed on the stage. In frame 11, add the action "Go to", making sure
the Play box on the right is unchecked and the Label is checked and set at
0.
Next, add another action. Highlight "Go to and Stop," then +(Plus) > Tell
Target. Add /Clock/10Seconds in the Target box on the right. Then add
another "Go to" action, this time checking Next Frame. It should look like
this when done:
Go to and Stop Label 0
Begin Tell Target /Clock/10Seconds
Go to Next Frame
End Tell Target
If items end up in the wrong order use the up and down arrows on the right
side of the dialog box to rearrange them.
|