Tweening Motion ----Using a Motion Path

  1. You first want to create your object
  2. Then click on a layer that you want then Insert Frame so that there are frames starting at 1 to 15.
  3. Use the arrow tool to drag a selection border around the object, It will be easier if you have your object as a separate layer.
  4. Select the layer containing the animation and select Insert > Timeline > Motion Guide.
  5. Control click the layer containing the animation and select Add Motion guide from the menu.  Flash creates a new layer above the selected area.
  6. Use the Pen, Pencil, Line, Circle, Rectangle, or Brush tool to draw the desired path..
  7. Snap the center to the beginning of the line in the first frame, and to the end of the line in the last frame.
  8. Choose control rewind and then control Play

 

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.

Adding Sound to a Layer

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

  1. First you need to insert a layer and call it button and add a rectangle, square, or circle for the button.
  2. Click the Selection tool in the Tools panel, and click the rectangle on the Stage to select it.  A cross-hatch pattern appears over the rectangle when you select it.
  3. Open the Property inspector (Window > Properties > Properties).  This is where you can set the exact height and width of your object.
  4. With the object still selected press f8 to make it a symbol.
  5. In the Convert to Symbol dialog box, type inv btn in the Name text box, select Button, and then click OK..
  6. Double-click the new button on the Stage to enter the Symbol-editing mode.

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)..

  1. Click the keyframe at the Up frame, and hold down the mouse button while you drag the keyframe to the Hit frame. Now the entire area of the banner is clickable, but there is no visual appearance of the button on your banner.
  2. Click Scene 1 to return to the main Timeline. Now there is a teal rectangle over the banner area. This refers to the invisible button's Hit area. If it's distracting to you, you can hide the button layer in the authoring environment..