Setting the Tween Property

I l @ ve RuBoard

To have a working motion tween, you need three things: a beginning keyframe containing a group or a symbol, in-between frames defined as motion tweens, and an ending keyframe containing the same group or symbol to which you've made some kind of change.

The Create Motion Tween command helps ensure that you have all the ingredients in the correct places. You can also create motion tweens manually by setting up the begin ing and ending keyframes and then defining the frame sequence as a motion tween in the Frame Property Inspector.

To access the Frame Property Inspector:

  • With the Property Inspector open , select a Frame in the Timeline.

    The Property Inspector displays information about the selected frame (Figure 9.7). (If the Frame Property Inspector is not open, choose Window > Properties.)

    Figure 9.7. When you select a frame in the Timeline, the Property Inspector displays information about that frame.

    graphics/09fig07.gif

You can use motion tweening to create the same bouncing ball as in the preceding exercise, but in a slightly different way.

To define motion tweens via the Frame Property Inspector:

  1. Create a new document with a ball near the top of the Stage in Frame 1.

    (For more detailed instructions, follow steps 1 through 4 of the preceding exercise.)

  2. Select the bal , and from the Modify menu, choose Group.

    Flash can make motion tweens only from groups or symbols. The Create Motion Tween command creates a symbol if you use it on editable shapes . When you define the motion tween yourself, you must create the group or symbol yourself.

  3. In the Timeline, select Frame 5, and choose Insert > Keyframe.

    The Insert > Keyframe command makes a new keyframe that contains the same elements as the preceding keyframe.

  4. Select Frame 10, and choose Insert > Keyframe.

  5. Select Frame 5, and drag the ball to the bottom of the Stage.

    You have just re-created the same keyframes you wound up with in the preceding exercise. In Frame 1, the ball is at the top of its bounce; in Frame 5, the ball is at the bottom of its bounce; and in Frame 10, the ball is back up at the top.

  6. To define the motion tween for the first half of the ball's bounce, in the Timeline, select any of the frames in the first keyframe span (1, 2, 3, or 4).

    Note that Flash automatically selects the ball graphic. When you define a motion tween, the graphic to be tweened must be selected.

  7. From the Frame Property Inspector's Tween pop-up menu, choose Motion.

    The parameters for the motion tween appear (Figure 9.8). You learn more about using these parameters in the following exercises.

    Figure 9.8. Choose Motion from the Frame Property Inspector's Tween pop-up menu to access the parameters for motion tweens.

    graphics/09fig08.gif

    Flash defines frames 1 through 4 as a motion tween. The tweening arrow and color coding appear in the Timeline, just as they do when you use the Create Motion Tween command.

  8. To define the motion tween for the second half of the ball's bounce, in the Timeline, select any of the frames in the second keyframe span (5, 6, 7, 8, or 9).

  9. Repeat step 7.

    Flash creates the second half of the ball's bounce with another motion tween (Figure 9.9). Note that in this exercise, you never see the broken line indicating an incomplete tween. That's because you defined the changes to the ball in the three keyframes before you told Flash to do the tweening.

    Figure 9.9. Defining a motion tween via the Frame Property Inspector for Frame 7 creates a motion tween for the entire Keyframe 5 span (frames 5 through 9).

    graphics/09fig09.gif

graphics/01icon02.gif Tips

  • You can access the Frame Property Inspector from the contextual menu for frames. Control-click (Mac) or right-click (Windows) a frame in the Timeline to bring up the contextual menu.

  • Here's another way to select the proper frames for defining a motion tween. Position the playhead within the keyframe span that you want to tween; then, with the arrow tool, select the grouped graphic or symbol on the Stage. Flash selects the keyframe span in the Timeline as well.


I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net