#38 Creating Motion Tweens
Creating motion tweens is very similar to creating shape tweens (see #36). Here are the significant differences:
- Motion tweens work only with groups, instances of symbols, and symbol-like objects such as bitmaps.
- Motion tweens can change an object's location, transformation, color, and opacity, but they can't morph one object into another as shape tweens can.
- Unlike a shape tween, which can include multiple objects in a single keyframe, a motion tween works with one object at a time. If you want to motion-tween several objects simultaneously, each must be tweened separately on a separate layer.
- Motion tweens can be controlled by motion guides (see #40); shape tweens can't.
- Motion tweens are more predictable, more reliable, and less processor-intensive than shape tweens. If you have the option of using either a shape tween or a motion tween to achieve the same effect, use the motion tween.
Here are the usual steps for setting up a motion tween:
- Place an instance of a symbol on the Stage in an empty keyframe.
- Decide on a duration for the motion tween, and select the cell in which the last keyframe should fall.
Press F6. Flash fills the in-between cells with regular frames, creates a new keyframe in the selected cell, and copies the object from the preceding keyframe into it.
For a motion tween to work, the objects in both keyframes must be instances of the same symbol.
With the second keyframe still selected, modify the object. You can move it to a different place on the Stage, transform it with the Free Transform tool, change its color or opacity, or do any combination of those things.
To change the object's color or opacity, use the Color Styles menu (see #25). Changing color by means of swatches or the Color panel doesn't work with motion tweens.
- Select the first keyframe again. As with shape tweens, the process will work if you select one of the intermediate frames, but selecting the first frame is recommended.
- In the Property inspector, choose Motion from the Tween menu. The frames between the two keyframes turn blue (not green, as with a shape tween), and an arrow points from the first keyframe to the last.
- Scrub through or preview the movie to see the motion tween in action.