Shape tweening in Adobe Flash CS3 Professional works much like motion tweening. You set up a keyframe span (the graphic content of the beginning and ending keyframes must be different in some way), then you set the span’s Tween property to Shape. Flash redraws the graphics for each in-between frame, making the incremental changes that transform the first shape into the final one. Shape tweens can animate changes to the same types of properties as motion tweens (size, color, location, and so on), but shape tweens also animate changes to the path that defines the “shape” of your graphic content.
Flash can shape-tween more than one graphic on a layer, but the results can be unpredictable. When you have several shapes on a layer, there is no way to tell Flash which starting shape goes with which ending shape. By limiting yourself to a single shape tween on each layer, you tell Flash exactly what to change.
Because you’ll be setting the Tween property throughout this chapter, keep the Properties tab of the Property inspector open. Unless otherwise indicated, you can perform the tasks in this chapter using merge-shapes, drawing-objects, or primitives.
Although shape tweens can animate changes in many properties of graphics—color, size, location—the distinguishing function of shape tweening is to transform one shape into another. You could use a shape tween to simply replicate the simple bouncing-ball animation you created in Chapters 8 and 9. A better use of shape tweening for a bouncing ball is to flatten the ball as it strikes the ground.
To define shape tweens via the Frame Properties tab of the Property inspector:
The tool can be in Merge or Object Drawing mode. Do not use the oval-primitive tool.
This circle will be the ball.
Flash creates a new keyframe that duplicates the preceding keyframe.
Note that the ball is selected automatically. When you define a shape tween, the element to be tweened must be selected.
The settings for the shape tween appear (Figure 10.3).
Flash creates a shape tween in frames 1–4 and color-codes those frames in the Timeline. With Tinted Frames active (choose it from the Frame View pop-up menu at the end of the Edit Bar), Flash applies a light green shade to the frames containing a shape tween. If Tinted Frames is inactive, the frames are white (Mac) or patterned (Windows), but Flash changes the arrow that indicates the presence of a tween from black to green.
• To preserve sharp corners and straight lines as one shape transforms into another, choose Angular.
• To smooth out the in-between shapes, choose Distributive.
Flash creates the second half of the ball’s bounce with another shape tween (Figure 10.4).
• Flash doesn’t prevent you from defining shape tweens for frames that contain grouped shapes or symbols, but those tweens won’t work. Flash does warn you by placing the broken-tween dotted line in the relevant frames in the Timeline. When you select such frames, a warning button appears in the Frame Properties tab of the Property inspector (Figure 10.5). When you see these warnings, go back to the Stage and reevaluate what’s there. If the item you want to tween is a group or symbol, you can use motion tweening. Or, to use shape tweening, you can break the group or symbol apart (select the shape or symbol, and then choose Modify > Break Apart). If there’s a symbol or group on the same layer as the editable shape you want to tween, move the extra item to its own layer (select it and choose Modify > Timeline > Distribute to Layers).
• Note that custom-easing settings aren’t available for shape tweens; they’re strictly for motion tweens.
Flash can transform both fill shapes and lines (strokes). In this section, you try some shape-changing tasks with both types of shapes.
To transform an oval into a rectangle:
Flash creates a keyframe but removes all content from the Stage.
Don’t worry about placing the rectangle in exactly the same location on the Stage as the oval; you’ll adjust the position later.
Flash transforms the oval into the rectangle in three equal steps—one for each in-between frame (Figure 10.8).
Flash displays all the in-between frames.
The oval transforms into a rectangle, remaining in one spot on the Stage.
To transform a rectangle into a free-form shape:
Don’t make the fill too complex—just a blob or brushstroke with gentle curves.
Flash transforms the rectangle into the free-form fill in three equal steps—one for each in-between frame (Figure 10.10).
In motion tweening, Flash limits you to one item per tween, meaning just one item per layer. In shape tweening, however, Flash can handle more than one shape on a layer. The drawback is that you may get some strange results. The simpler and fewer the shapes you use, the more reliable your multiple-shape tweens will be. For the most predictable results, limit yourself to one shape per layer.
You may want to keep both shapes on the same layer for a fill with an outline (stroke), however. As long as the transformation isn’t too complicated, Flash can handle the two together.
To shape-tween fills with strokes (outlines):
Flash tweens the fill and the stroke together and tweens the change in color (Figure 10.11).
• You can tween a disappearing act: Make the stroke around a shape (or the shape, or both) get gradually lighter and lighter, until it finally disappears. Make the color of the final stroke (and/or shape) in the tween match the color of the background, or give it a fully transparent color (one with an alpha setting of 0 percent).
• To ensure that the item in the preceding tip does fully disappear (some low-color monitors may not display tint and alpha changes accurately), select the frame following the last keyframe of the tween sequence. Choose Insert > Timeline > Keyframe to duplicate the previous keyframe; then delete your disappearing stroke (or shape). If you want both the shape and its stroke to disappear together, choose Insert > Timeline > Blank Keyframe.
The more complex the shape you tween, the more difficult it is for Flash to create the expected result. You can help Flash tween better by using shape hints—markers that let you identify points on the path of the original shape that correspond to points on the path of the final shape.
To shape-tween a more complex shape:
Flash duplicates the contents of keyframe 1 in keyframe 5.
(For more detailed instructions on editing shapes, see Chapter 4.)
Flash handles the tweening for this change well (Figure 10.13). It’s fairly obvious which points of the oval should move in to create the petal shapes. If you modify the shape further, however, it becomes more difficult for Flash to know how to create the new shape. That’s when you need to use shape hints.
Flash duplicates the flower shape in a new keyframe.
Reshape the flower’s path with the selection tool or the pen and subselection tools, or add a stem with a brushstroke in the same color as the flower.
The addition of the stem to the flower makes it difficult for Flash to create a smooth tween that looks right (Figure 10.14).
Flash places a shape hint—a small red circle labeled with a letter, starting with a—in the center of the object in the current frame. You need to reposition the shape hint to place it on a problem point on the shape’s path.
As you drag, Flash previews the hint’s position with a circle icon; the circle gets darker and thicker when it connects with the path. Don’t worry about getting the shape hint in exactly the right spot; just make sure it is on the path. You can fine-tune its position later.
Each time you add a shape hint, you get another small red circle labeled with a letter. You can’t place the hints at random; you must place them so they go in alphabetical order around the edge of the shape. (Flash does the best job when you place shape hints in counterclockwise order, starting in the upper-left corner of the shape, but you can also place them in clockwise order.)
Flash has already added shape hints to this frame; they all stack up in the center of the shape.
Keep them in the same order (counterclockwise or clockwise) you chose in step 8 (Figure 10.17). When the end-of-tween shape hint is sitting on a path, the hint changes from red to green; if you select the initial keyframe of the span, you can see that the associated beginning-of-tween hint has turned yellow.
Set the onion markers to include all the frames of the tween. Where the onion skins reveal rough spots in the tween, you may need to match the hint position better from the first keyframe to the last one (Figure 10.18). Repositioning the shape hints changes the in-between frames. You may need to adjust the shape hints in both keyframes. If you still can’t get a smooth tween, try adding more shape hints.
• To remove a single shape hint, make the initial keyframe the current frame. Select the shape hint you want to remove, and drag it out of the document window. Or, Control-click (Mac) or right-click (Windows) the shape hint, and choose Remove Hint.
• To remove all the hints at the same time, with the initial keyframe current, choose Modify > Shape > Remove All Hints. Or -click (Mac) or Ctrl-click (Windows) any shape hint, and choose Remove All Hints.
• Onion skins don’t always update correctly when you reposition shape hints. Clicking a blank area of the Stage forces Flash to redraw the onion skins.
• If you can’t create a smooth tween using shape hints alone, break the tween into smaller pieces by adding keyframes where the morphing gets off track. Then redraw the shapes for those frames yourself.
You can’t create shape tweens that follow a path, but you can move shapes around the Stage in straight lines. To do so, reposition the elements on the Stage from one keyframe to the next.
To shape-tween a moving graphic:
Flash adds blank in-between frames 2 through 20.
Note that you must click the frame to select it; you can’t just position the playhead in the frame.
Even though you have no shapes on the Stage to tween yet, Flash gives the frames the shape-tween property. In the Timeline, the frames contain a dotted line, indicating that the tween is incomplete (Figure 10.20). Now you can add keyframes and shapes.
Flash creates four shape-tween sequences (Figure 10.21). For the moment, they’re broken tweens because the keyframes are empty.
In frame 1, for example, draw a circular fill in the bottom-left corner of the Stage. In keyframe 5, draw a rectangular fill in the top-right corner of the Stage. In keyframe 10, draw an oval in the bottom-right corner of the Stage. In keyframe 15, draw a star in the top-left corner of the Stage. And in keyframe 20, duplicate keyframe 1’s circle in the bottom-left corner of the Stage. For extra variety, give each object a different color. As you add content to keyframes, Flash fills in the spans in the Timeline with tween arrows.
You see a graphic that bounces around the Stage, morphing from one shape to the next (Figure 10.22).
• Although shape-tweened objects can’t follow a path the way motion-tweened objects can, you can make Flash do the work of creating the separate keyframes you need to animate shape tweens that move on curved paths. First, create your shape tween. In the Timeline, select the full range of frames in the tween sequence. Choose Modify > Timeline > Convert to Keyframes. Flash converts each in-between frame (with its transitional content) into a keyframe. Now you can position each keyframe object anywhere you like. To simulate a motion guide, create a regular guide layer (see Chapter 6), and draw the path you want your morphing shape to follow. Choose View > Snapping > Snap to Objects. Reposition the shape in each keyframe. When you drag a shape close to the line on the guide layer, Flash snaps the shape to the line.
• Alternatively, to animate a changing shape that follows a path, you can create a shape tween, save that animation as a movie-clip symbol, then create a new motion tween using that symbol and a motion guide. You’ll learn about saving animation as movie-clip Symbols in Chapter 11.
3.143.3.208