Moving Graphics in Straight Lines

I l @ ve RuBoard

In the preceding exercises, you created an animation of a well-behaved bouncing ball one that simply moves up and down. You can make that ball bounce all around the Stage like a crazy Ping-Pong ball, if you like. Simply add more keyframes and position the ball in a variety of locations. The ball moves in a straight line from one position to the next , but the effect can be one of much livelier movement.

If you move the ball a great distance and then tween the motion in a small number of in-between frames, you'll get frenetic bouncing. If you move the ball a short distance or use a larger number of in-between frames , you'll slow the action.

To move an item from point to point:

  1. Create a new Flash document.

  2. On the Stage, in Frame 1, use the oval tool to create a solid circle that represents the ball.

  3. Select the bal , and choose Modify > Group or Insert > Convert to Symbol.

    Flash can create motion tweens only from grouped objects or from symbols.

  4. In the Timeline, select Frame 20, and choose Insert > Frame.

    Flash creates 19 in-between frames.

  5. In the Timeline, select Frame 1.

  6. From the Insert menu, choose Create Motion Tween.

    Flash defines frames 1 through 20 as a motion tween but with a broken line, indicating that the tween is not yet complete (Figure 9.21). You need to create keyframes that describe the ball's motion.

    Figure 9.21. The dotted line in the Timeline indicates that these 20 frames contain a motion tween, but a broken one. The final keyframe is missing.

    graphics/09fig21.gif

  7. In the Timeline, position the playhead in Frame 5.

  8. On the Stage, drag the ball to a new position.

    Try moving the ball a fair distance. Flash creates a new keyframe in Frame 5 and completes a tween for frames 1 through 5.

  9. In the Timeline, position the playhead in Frame 10.

  10. On the Stage, drag the ball to a new position.

    Flash creates a new keyframe in Frame 10 and completes a tween for frames 5 through 10.

  11. Repeat this repositioning process for frames 15 and 20.

    You now have a ball that bounces around wildly (Figure 9.22).

    Figure 9.22. As you move the ball to new positions in different frames within the motion tween, Flash creates keyframes and completes the tween between one keyframe and the next.

    graphics/09fig22.gif

  12. To add more frames, select Frame 30 or Frame 40 and then choose Insert > Frame.

    Flash extends the motion tween, and you can add keyframes by following the procedure described earlier in this exercise. Just be sure to make the last frame in the series a keyframe.

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