Even Shapes Need a Hint

[ LiB ] 





In this book, you've heard the term "hint" several times. Normally it has referred to ActionScript. Until now. There is another type of hint in Flash known as a shape hint. Here's an example showing how it works.

Make sure Snap to Objects is enabled, and then create a square on Frame 1 of your Timeline. Now add an empty keyframe on Frame 24 and place a circle of similar size to the Stage. Add a Shape Tween to the frame span so it will morph from a square to the circle. Watch the animation and see how Flash morphs from one to the next. Now go to the first keyframe of the tween and press CTRL-SHIFT-H (SHIFT-CMD-H on Mac). You'll see a small red circle with an "a" in it appear. This is called a shape hint. Press CTRL-SHIFT-H again. Drag the "b" circle up to the bottom-left corner of the square until it snaps in place. Drag the "a" to the bottom-right corner. Go to Frame 24 and drag the "b" to the top-right edge of the circle and the "a" to the top left. They should snap in place and turn green to indicate that they're set.

When you replay the animation, you'll see that the same animation morphs in a whole new way. Flash matches the point of each shape hint on each keyframe to that of the next. This enables you to actually control the way your shapes animate. Add as many hints as you like and right-click any of them to remove one or all of them. Doesn't get much more powerful than that.

[ LiB ] 

Macromedia Flash MX 2004 Killer Tips
Macromedia Flash MX 2004 Killer Tips
ISBN: 0735713839
EAN: 2147483647
Year: 2003
Pages: 300
Authors: Shane Elliott

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net