Editing the Motion Path

When it comes to moving objects around the stage, the motion path rules. That means you need to know how to change the path. As explained back on Making It Move with Motion Tweens, you make symbols move on the stage using the X and Y position properties. If the values change from one property keyframe to the next, then the symbol moves. You set the X and Y properties by moving the playhead to a frame and then moving the object or changing the X and Y properties in the Properties panel. Either way, your symbol moves, and it sprouts a motion path, like the one shown in Figure 3-18.

Suppose you've got the perfect motion, and everything's working just the way you want. The only problem is that it's on the wrong place on the stage. You can move the entire motion path and the symbol that's being animated in one fell swoop. Here are the steps:

Moving an entire motion path is easy for you, but Flash is working hard behind the scenes. It's changing all the X and Y properties for every property keyframe and calculating the new values for the tween.

The shortest distance between two points is a straight line, and that's exactly what Flash uses when you first make a symbol move. You're not stuck with that choice, though—it's easy to make the line curve.

  1. With the Selection tool, move the cursor to an unselected motion path.

    If the path is unselected, you see the curve cursor shown in Figure 3-19. The key here is that the path must not be selected. If it's selected, Flash shows the move cursor (the cross with four arrows).

  2. Click, drag, and then release the mouse button.

    As you drag, you see a preview of the new curved motion path. When you release the mouse button, the path is set.

This method for creating curves works well, but it takes some practice to create just the path you want. You can also combine the curve technique with fixed property keyframes along the motion path. For example, to create a double curve, start with a straight path and pull it into a curve, as shown at right in Figure 3-19. Move the playhead to a frame so that the wheel is centered on the path. Then, drag the wheel in the opposite direction of the curve. Moving the wheel creates a new property keyframe on the path and creates a motion path similar to the one in Figure 3-20.

If you want to reposition one of the end points without moving the rest of the motion path, use the Subselection tool (A), which looks like a hollow arrow. Click the motion path with the Subselection tool, and the path end points appear as hollow squares. With the Subselection tool, you can click and drag these points to a new location.

Here's one last motion path trick to learn. Suppose you want to create a complex motion path with lots of curves or lots of sharp angles. You can do that manually, using the techniques already described in this chapter, but there's a faster method. You can draw a line and then paste it into your tween. You can't draw directly in the tween, so you need to draw the path in a separate layer or even in a separate Flash document.

You can also paste a hand-drawn path into a motion tween that doesn't yet have a path. Just select the symbol you want to move, and then press Ctrl+V (⌘-V). There's an extra benefit to drawing a path with the Pencil or Pen tool. As shown in Figure 3-21, drawn paths have anchor points within the line. You can use these points to accurately reshape the line.