Learning Adobe Flash CS4 Professional: Frame rates
When you position-tween an instance across the Stage, you see a motion path for that animation appear on the Stage. The motion path is a line that represents the spatial movement of the tweened instance, and it has dots (sometimes called tween dots or frame dots) that represent the target objects position along the path at frames on the timeline—either single frames, or groups of frames if you have a long tween span selected. The tween dots not only signify frames, but can help you see the instance’s position as affected by any applied easing or 3D.
Using the Motion Property inspector
When you select a tween span or a motion path on the Stage, the context-sensitive Property inspector displays motion properties. This is called the Motion Property inspector, and it’s where you can find useful information about the selected motion tween, such as the location and size of its motion path and its instance name (if one has been added for the tween). You can also rotate the tweened instance across the entire tween span, set the tween’s orientation along its motion path, or apply a simple ease from the Motion Property inspector.
You need to use the Motion Property inspector’s panel menu to access an option that lets you view all motion paths on the stage simultaneously. When you have multiple motion paths on the Stage, select one of the tweens and select Always Show Motion Paths from the Motion Property inspector panel menu. If you do not have this option selected, you see only the motion path when the playhead is within the tween span.
Creating and removing motion paths
If you changed the position of a tweened instance in earlier sections of this learning guide, you have already created a motion path. It is very easy to do in Flash CS4. The following exercise shows you a couple of ways you can create a motion path for a tweened instance.
- Create a new document with a movie clip on the Stage.
- Right/Control-click the instance on the Stage and choose Create Motion Tween.
- Drag the instance to a new location on the Stage. A motion path is created between the first and second position of the instance (see Figure 34).
- Select the motion path on the Stage, and then press the Delete or Backspace key. The motion path is removed from the tween, so the instance no longer animates its position.
- Insert a new layer on the Timeline, and use the Pencil or Pen tool to draw a path.
- Double-click the path to select it using the Selection tool, and then select Edit > Copy to copy the path to the clipboard.
- Select the tween span and select Edit Paste. The path you drew is now used as the motion path for the tween.
There are some limitations to the motion path you can paste. It cannot be a closed shape, such as a closed circle. To use a circle shape, you would need to erase a bit of the circle so it has a slight gap. You also cannot use fills, like the Brush tool, to create motion paths. You also need to make sure that your path does not have segments that overlap for more than one pixel (you might need to zoom in to see them), although intersecting lines in a path, such as a loop, are okay. To successfully paste the path, you may need to optimize it or delete and rejoin the offending sections.
If you have a very short motion tween and paste a long path onto that tween, you may see a dialog box that prompts you to optimize or sample the motion path. This affects how many keyframes are added to the x and y property graphs. Optimizing will reduce the number of keyframes in the graphs, although this may affect the appearance of the motion path on the Stage. Sampling the motion path will maintain the Stage appearance, although you will have a lot of keyframes in the Motion Editor. This also means your path will be difficult to further modify on the Stage.