• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 14. Fonts and Menus > Animating Sprites

Animating Sprites

To give the exit scene a bit of flair, you will add some animation to the Oval and fiveears sprites. Instead of just appearing on the stage, they will move in from off the stage, one from each side, and then come together at the proper location. For smooth animation, you will need to extend the sprites so the animation can encompass more frames, and you will need to add a keyframe.

Shift+click to select both the Oval and fiveears sprites in the Score window and then set their endpoints to frame 170.

You can set the endpoints using the End Frame field of the sprite toolbar or Property Inspector, or you can just drag the endpoints (but not both at once) to frame 170. Next you need to add the new keyframes.

Click the Oval sprite at frame 125 and then choose Insert > Keyframe. Repeat the process to add a keyframe for the fiveears sprite.

The locations of the two sprites at the new keyframes, and also at the endpoints, are exactly where you want them. It is the beginning frame that needs to be modified so that the sprites animate as if coming in from off of the stage.

Figure .

Click the beginning frame, frame 105, for the Oval sprite in the score. On the stage, drag the sprite off of the stage at the lower-left corner. Repeat the process with the fiveears sprite, but drag this sprite off of the stage at the lower-right corner.

Now the two sprites will appear on the stage from the two bottom corners and come together at the upper left of the stage. The 20 frames that the animation covers are sufficient to make the animation appear smooth.

Tweening lets you create some types of animation so quickly that once you've learned the process, you'll probably find that it takes less time to create the animation than to read about it. That's the case for the animation you created in the last steps—moving a sprite's location around the stage. It is also true for animation using a number of other properties that Director automatically tweens: skew, rotation, size, and blend. It is a simple process, and one that you should try sometime, to make a sprite appear to be approaching from a distance while spinning. In the beginning keyframe, you shrink the sprite (using the bounding box's resizing handles, for example), and in the end frame, you set the number of rotations you want (using the sprite toolbar's Rotation Angle, for example). The sprite will spin through the rotations while increasing in size, and therefore appear to be approaching the user. The point is that not only will Director automatically tween a single property, such as location, it will just as easily tween any or all of the tweenable properties at the same time. You will use tweening with the Blend ink effect to make a sprite appear to fade in on the stage, but first you need to create the text cast member that will be used.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint