Macromedia Director MX for Windows and Macintosh. Visual QuickStart Guide

   

When you tween a sprite's location so that it moves around the Stage, the path that the sprite follows is known as a motion path . If the Show Paths feature is turned on (which it is by default), you can see a selected sprite's complete motion path in the form of a dotted line on the Stage ( Figure 4.19 ). Keyframes within the path are represented by colored circles; regular frames are represented by black dots.

Figure 4.19. The motion path of a selected sprite is visible on the Stage.

Using that dotted line as a visual reference, you can make adjustments to the shape, curvature, and acceleration of the sprite's motion path.

To change the shape of a sprite's motion path:

  1. In the Score, select the sprite whose path you want to view or adjust.

  2. If the sprite's motion path isn't visible on the Stage, choose View > Sprite Overlay > Show Paths to turn it on ( Figure 4.20 ).

    Figure 4.20. You can turn the path display on and off from the View menu.

  3. Drag any of the keyframe circles to a new position ( Figure 4.21 ).

    Figure 4.21. You can adjust the motion path by dragging any of the keyframe circles.

    The sprite's path adjusts immediately.

Tip

  • If you select an entire sprite in the Score (rather than just a single keyframe), you can then drag the sprite and its entire motion path to a different location on the Stage.

To smooth a sprite's movement:

  • Drag the sprite's last keyframe to the right. Doing so causes all the keyframes to move apart from each other.

    When you drag keyframes farther apart, you increase the number of frames between the keyframes. This makes the movement less jerky, but it also slows down the animation; so you may want to increase the frame rate to compensate. (See "Setting a Movie's Tempo" in Chapter 5.)

Tip

  • If some keyframes are close together and others are far apart, the sprite may abruptly speed up and slow down as the movie is played . To minimize the abruptness of these speed changes, choose Modify > Sprite > Tweening and select Smooth Changes ( Figure 4.22 ).

    Figure 4.22. Click Smooth Changes in the Sprite Tweening dialog box to make the sprite's speed changes more gradual.

Keyframe Color Coding

The circles that represent keyframes on the Stage are color-coded to help you determine the direction of the sprite's motion path. A sprite's first keyframe is green, and its last keyframe is red. All other keyframes are yellow (if the entire sprite is selected) or white (if the sprite is unselected ).

If a particular keyframerather than the entire spriteis selected in the Score, the circle representing that keyframe on the Stage turns blue.

To adjust the curvature of a sprite's motion path:

  1. In the Score, select a sprite whose motion path you wish to adjust.

  2. Choose Modify > Sprite > Tweening. The Sprite Tweening dialog box opens.

  3. In the Sprite Tweening dialog box, drag the Curvature slider to adjust how much curvature is in the sprite's path.

    You can preview the adjusted path on the left side of the Sprite Tweening dialog box ( Figure 4.23 ).

    Figure 4.23. Preview the sprite's motion path in the preview pane of the Sprite Tweening dialog box.

    Drag the slider to the Linear end to move the sprite in straight lines between keyframes ( Figure 4.24 ).

    Figure 4.24. Linear settings produce straight-line motion.

    Drag the slider to Normal to give the sprite's path moderate curvature.

    Drag to the Extreme end for maximum curvature in the path between keyframes ( Figure 4.25 ).

    Figure 4.25. Extreme settings cause the sprite to curve outside of the positions set by its keyframes.

Tips

  • The curvature settings affect only sprites that have three or more keyframes and whose motion path isn't a straight line.

  • If you want greater control over the shape or curvature of a sprite's motion path, create additional keyframes within the sprite and make the adjustments by hand.

To create a circular path for a sprite:

  1. Create a new sprite by dragging a cast member to the Stage or Score.

  2. Insert three keyframes in the sprite ( Figure 4.26 ). (Including the default first keyframe, this makes a total of four keyframes.)

    Figure 4.26. Create a sprite with exactly four keyframes.

    Leave the end frame alonedon't turn it into a keyframe.

  3. If the sprite's motion path isn't visible on the Stage, choose View > Sprite Overlay > Show Paths to turn it on.

  4. On the Stage, position the sprite's keyframes as corners of a diamond ( Figure 4.27 ).

    Figure 4.27. Position the sprite's keyframes in a diamond pattern.

  5. Select the sprite in the Score and choose Modify > Sprite > Tweening.

    The Sprite Tweening dialog box opens.

  6. Select the Continuous at Endpoints checkbox ( Figure 4.28 ).

    Figure 4.28. Selecting Continuous at Endpoints closes the path.

    That option closes the path.

  7. Drag the Curvature slider to the right to make the sprite's path resemble a circle.

    Use the path preview on the left side of the Sprite Tweening box as a guide.

  8. Click OK.

  9. Fine-tune the circular path, if necessary, by dragging the keyframes (represented by circles) to new locations on the Stage ( Figure 4.29 ).

    Figure 4.29. The resulting circular path, after fine-tuning.

To accelerate or decelerate a sprite along its path:

  1. In the Score, select a tweened sprite whose movement you want to adjust.

  2. Choose Modify > Sprite > Tweening.

    The Sprite Tweening dialog box opens.

  3. Drag the Ease-In and Ease-Out slider bars to control the sprite's acceleration along its path ( Figure 4.30 ).

    Figure 4.30. Drag the Ease-In and Ease-Out slider bars in the Sprite Tweening dialog box to control a sprite's acceleration and deceleration.

    The Ease-In slider controls the beginning of the sprite's motion: High settings make the sprite take a longer time to reach "cruising speed." The Ease-Out slider controls the end of the sprite's motion: High settings make the sprite take a longer time to slow down ( Figure 4.31 ).

    Figure 4.31. A sprite's motion path with default settings (above), and with Ease-In and Ease-Out settings of about 40 percent (below).

To reverse the direction of a sprite:

  1. In the Score, select a tweened sprite whose direction you want to reverse.

  2. Choose Modify > Reverse Sequence.

    The order of the keyframes within the sprite is reversed , causing the animation to run backward.

   

Категории