This worksheet will help you to develop the ability to
create interaction and animation in a Flash movie using a movie clip.
This movie is representative of your end product.
Step 1: Create a Movie Clip
A movie clip in Flash is a mini movie that resides within another movie.
It has its own time line. Here's how to create one.
Open a new Flash document. Accept the default document properties.
Click Insert > New Symbol ...
At the New Symbol dialog box, name the movie clip birdie and be sure
that the radio button for Movie Clip is selected.
Import a sequence of images. In the d101student is a folder named
ActionScript 1. Locate and import 1.gif. Flash will prompt you to import
the entire sequence. Agree to that.
Open the Library (Window > Library), and notice that all of the
.gif files for the birds are now in the movie Library as well as a Movie
Clip named birdie. Notice also that we are no longer in the Scene 1
timeline but in a sub-timeline named birdie. Click on Scene 1 to return
to the main timeline.
Rename Layer1 to birdie. Drag a copy of the birdie movie clip from
the Library to the stage.
Save your movie as birdie.
Test your movie.
Step 2: Animate the movie clip.
Insert a keyframe in frame 24. This gives us 2 seconds in our movie.
In frame 1, move the movie clip offstage left. In frame 24, move the
movie clip offstage right.
Select the birdie layer and create a motion tween.
Save and test.
Step 3: Add a stop action.
Add a layer and name it Actions.
Insert a keyframe in frame 12.
Open the Actions panel.
On the left is a list of Action types.
Open Actions and open Movie Control under that.
Double click on stop. Flash adds the stop action to the action script
pane.
Save and test your movie.
Step 4: Add a button.
Add a new layer and name it Buttons. Move to under the Actions layer.
It is a generally accepted ActionScript standard practice to position
the Actions layer at the top layer.
Select the Buttons layer. Add keyframes in frames 12 and 13.
In frame 13, use the Properties panel to name the frame "fly."
Open the Button Library (Window > Common Libraries > Buttons)
Select the Push button - yellow
Drag it to the stage in frame 12 of the Buttons layer.
Move your playback head back and forth to verify that the button is
only in frame 12.
Step 5: Add ActionScript to the Button.
Select the button.
Open the Actions panel.
Select Actions > Movie Control. Double click on "on."
Notice that script is entered into the script pane. Observe the range
of events to which we can respond. We want to respond to the release
of the mouse button. Verify that the item checked is "release."
Select Actions > Movie Control > goto and double click on "goto."
Notice that "gotoAndPlay" is entered into the script pane.
Change the Type from Frame Number to Frame Label
Change the Frame from 1 to fly.
Save and test your movie.
Now you are able to create a movie clip, add it to a Flash movie, animate
it and control its movement. In the next session, we will learn to control
the movie clip itself.