Card Flip

images

APOPULAR ANIMATION REQUEST appearing on the Flash public forums is how to animate a fslat card rotating or flipping 360 degrees. What makes this animation difficult for many to understand is the approach to actually making it. It is easy to assume, since Flash is a two-dimensional program, that adding a third dimension simply is not possible unless the object is redrawn manually one frame at a time. But with Flash, it’s all in the approach, and it doesn’t have to be taken literally. Two dimensions are plenty to work within for this animated effect.

 

images

1 Start with a simple rectangle with no stroke around it. Add a second keyframe on frame 10. Select the Free Transform tool images and then the Distort subselection tool.

images

2 Hold down the image key and pull a top corner point away from the shape. With the image key still pressed, pull a bottom corner in the opposite direction.

images

3 Click outside the shape to end the transformation. Select it again, hold down the image key and drag the bottom middle handle upward. The image key will constrain the shape vertically.

images

4 Turn on the Onionskin tool so you can see the previous frame. Position the newly transformed shape so that it is centered over the original shape seen through the onionskin.

images

5 New to Flash CS4 is the ability to apply a shape tween from the context menu in the timeline. So go ahead and apply one.

images

6 Now that you have the first half of the animation, you need to create the second half. Select frame 11 and insert a keyframe.

images

7 Modify the shape in frame 11 by flipping it vertically.

images

8 Select the keyframe in frame 1 and copy the frame imageimagesimage imageimagesimage. Next, select frame 20 and paste the frame imageimagesimage imageimagesimage.

images

9 Apply a shape tween to the latter half of your frames. You may experience a misbehaving tween like I did when writing this topic. Let’s fix it.

images

10 Let’s add some shape hints to correct the problem. Select the first frame in the faulty tween and then go to Modify > Shape > Add Shape Hint imageimageimages imageimageimages.

images

11 Drag the red “a” hint to one of the corners of your shape until it snaps.

images

12 Go to the last keyframe in your tween and drag the green “a” hint to the same respective corner. Repeat this procedure again for the opposite corner.

images

13 The final visual effect is to mix a slightly darker version of the color of the card and then use it to fill the shapes in frames 10 and 11.

images

14 The card will not only tween its shape, but also its color from light to dark. This color change makes for a convincing three-dimensional effect.

 

images

Hot Tip

While writing this topic, I experienced a common weakness with shape tweens in Flash. Due to the nature of vectors and how Flash tries to calculate what it thinks you want to achieve, sometimes the tween implodes or twists in ways we never anticipated. Shape hints exist for this very reason and they are easy to learn about in the Flash help docs. An alternative solution for this example would be to convert frames 1–10 to keyframes, copy and paste them in frames 11–20 and then reverse them.

images

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.237.77