arrow
arrow
H  10  11  12  13  14 

Hands-On: Flash MX 2004 Basic Animation

Exercise 12: Animation: Shape Tweens to Morph

  • The Shape tween is one of the least efficient features of Flash since the file size is larger than other animations, but the effect is nice.

NEW TERM: Morphing is a kind of animation that naturally changes one shape to another.

  • Shape Tweens are easy to create. Basically, all you do is draw a shape or a few shapes in two keyframes and set the tweening in the first keyframe to Shape. (You will notice that there will be a light green color behind the arrow on the Timeline for a Shape tween.)
    A Shape Tween on the Timeline has a light green background.
  • One of Flash's rules for Shape Tweens: NO groups and NO symbols. That's it! Remember this and Shape Tweens will be easy.
  • When is a motion tweenbetter than a shape tween? If you are keeping it simple and wish to tween colors or transparency of the same shape.
  • A shape tween is better if you wish to tween two entirely differentshapes. Let's say going from a square to a triangle, that's a morph and shape is the only thing that will let you do it.
  • There will be times when what you expected to see will be a bit of a disappointment for you. You might have to give Flash MX 2004 a bit of help to determine just what part of the image morphs into another part.
  • U sing Shape Hints for Flash MX 2004 is not hard to do, and it will certainly help on those animations that came out a disaster.
  • Basically, there are points on an image that can be mapped to points on another image, this will help Flash MX 2004 make the morph look quite natural.
  • To add a Shape Hint select Modify > Shape > Add Shape Hint or press [Control] + [Shift] + [H].

 

Follow these steps to use Shape Tweens to Morph a Square into a Triangle:

  1. In a new file, choose View > Rulers, and then View > Snapping > Snap to Objects. And, one more helper, in the Timeline’s zoom drop-down select a view of 200%. All these helpers will be self-evident very soon.
    Increase the Zoom level.
  2. Next, draw a perfect square, (hold the [Shift] key while you drag).
  3. In frame25 of the Timeline, insert a keyframe [F6]. In this frame you will change the square shape to a triangle shape, the triangle should be as similar in size as the square, and the next few steps will help you do this.
  4. In frame 25, using the pencil tool draw a vertical line that doesn't touch the square.
    Draw a line on the Stage at the top of the square.
  5. Select the black Arrow selection tool(make sure Snap to Objects is turned on), click once on the line to select it, and click and hold in the center of the line. (Make sure you have the circle, indicating that you've grabbed the center—if not, try grabbing the line again.)
  6. Now drag the line so it snaps in the center of the horizontal top of the square. (Notice the small circle on the line below.)
    Snapping to the center of the horizontal top.
  7. Click off the line and grab the top-left corner of your square. Drag it until it snaps to this bisecting line. Do the same for the top-right corner of the square. (See the below images for reference.)
    Dragging the top left corner.    The left side is now transformed.
  8. Select and delete the excess portions of the vertical line.
  9. Select the first keyframe and use the Properties panel to set Tween to Shape. (Scrub and you'll see the results are probably not what you expected. Now's the chance to use Shape Hints to help Flash create a better looking tween.)
    The Properties Inspector for the Shape Tween.  
  10. Place the red current frame marker in frame 1 and select Modify > Shape > Add Shape Hint (or press Ctrl +Shift + H).
    Adding a Shape Hint.    Move the Shape hit to the top left.  Moving another Shape Hint to the top right.  
  11. Notice a little red circle with the letter (a)(a Shape Hint). Temporarily move the red current frame marker to frame 25 and notice there's also a Shape Hint in this frame too.
  12. When you return to frame 1, the Shape Hint is colored yellow to indicate that it's been mapped.Finished Triangle shape utilizing the Shape hints. Make sure you're back in frame 1 and that Snap is turned on (select View > Snap to Objects). Use the Arrow tool and drag the Shape Hint so it snaps to the top-left corner of your square.
  13. Go to frame 25 and position Shape Hint a so that it snaps to the middle of the left side of the triangle. Notice that the Shape Hints turns green, indicating that it's been mapped. (When you return to frame 1, the Shape Hint is colored yellow to indicate that it's been mapped.)
  14. Scrub to see the results so far—if it looks good, you don't need to add any more Shape Hints. (Not this time, you've got more to do).
  15. In frame 1, add another Shape Hint [Control] + [Shift] + [H], which is automatically given the name b, and position it in the top-right corner of the square.
  16. In frame 25, map the second Shape Hint b to snap to the middle of the right side of the triangle.
  17. At this point the results should be much better than before you added any hints. Test your movie and Save it if you wish; it should look something like the images below.

Shape Tween starting animation.Shape tween morphing.Shape tween almost completely morphed.The new Triangle shape.

 

Back to Top