To create a motion tween using the Create Motion Tween
command:
1.
In the Timeline (Window > Timeline), double-click the Layer
1 title and type TireAnim. Press Enter
(Windows) or Return (Macintosh) to rename the layer. Rename the layer so that
you know what layer the animation is on.
2.
With the TireAnim layer still selected, Add your graphic or
draw what you want to animate.
3.
Use the Selection tool to reposition the graphic, if
necessary.
4.
With the Selection tool still selected, in the TireAnim layer,
select Frame 30. Then press F6 to insert a keyframe.
5.
Select Frame 15 and press F6 to add another keyframe.
6.
With the playhead still on Frame 15, press Shift to move the
graphic in a straight line, and drag the tire up, or anyway you want.
7.
In the TireAnim layer, select any frame between Frames 2
and 14. In the Property inspector (which is the menu thing at the bottom of
your screen, select Motion from the Tween pop-up menu. An arrow appears in the
Timeline between the two keyframes.
8.
Select any frame between Frames 16 and 29. Again, use the
Tween pop-up menu in the Property inspector to select Motion.
9.
Select File > Save to save your changes.
To create a
frame-by-frame animation:
1. Click a layer name
to make it the active layer, and select a frame in the layer where you want the
animation to start.
2. If the frame isn't
already a keyframe, select Insert > Timeline > Keyframe to make it one.
3. Create the artwork
for the first frame of the sequence.
You can use the drawing tools, paste graphics from the Clipboard, or import a file.
4. Click the next
frame to the right in the same row and select Insert > Timeline >
Keyframe, or right-click (Windows) or Control-click (Macintosh) and
select Insert Keyframe from the context menu.This adds a new keyframe
whose contents are the same as those of the first keyframe.
5. Alter the contents
of this frame on the Stage to develop the next increment of the animation.
6. To complete your
frame-by-frame animation sequence, repeat steps 4 and 5 until you've built the
motion you want.
7. To test the animation
sequence, select Control > Play or click the Play button on the Controller.
1. Select File >
Import to import a sound.
2. Select the sound
in the library, Control-click (Macintosh), and select Linkage.
3. Select Export for
ActionScript and Export in First Frame; then give the sound the identifier a_thousand_ways.
4. Add a button to
the Stage and name it play_btn.
5. Add a button to
the Stage and name it stop_btn.
6. Select Frame 1 in
the main Timeline, and select Window > Actions.
Add the following code to the Actions panel:
var song_sound:Sound = new Sound();
song_sound.attachSound("a_thousand_ways");
play_btn.onRelease = function() {
song_sound.start();
};
stop_btn.onRelease = function() {
song_sound.stop();
};
This
code first stops the speaker movie clip. It then creates a new Sound object (song_sound)
and attaches the sound whose linkage identifier is a_thousand_ways. The onRelease
event handlers associated with the playButton and stopButton objects start and
stop the sound by using the Sound.start() and Sound.stop() methods, and also play
and stop the attached sound.
7.
Select Control > Test Movie to hear the sound.
Event Sounds to a button:
1. Select the far-right button
and use the Property inspector to give the button an instance name of playSound_btn.
Creating a button
The rectangle is
currently on the first Up frame of the button you created. This is the Up state
of the button--what users see when the button sits on the Stage. Instead, you
want the button not to have anything visible on the Stage. Therefore, you need
to move the rectangle to the Hit frame, which is the hit area of the button
(the active region that a user can click to activate the button's actions)..