Making a Background More Efficient with Runtime Bitmap Caching

In this exercise, you will use runtime bitmap caching to boost playback performance in an animation. You'll be working with map.fla for this exercise.


Open map.fla from your TechBookstore folder on your hard drive, or from lesson10/start on this book's CD_ROM.

map.fla has a vector background that spans multiple frames. You will convert the graphics in this background to a movie clip and then turn on runtime bitmap caching so that the vector graphics don't have to be redrawn by the end user's computer in every frame.


Select your map layer, Right- or Control-click it, and choose Lock Others from the context menu.

You only want to select the graphics in the background layer, and nothing else. By locking the other layers, you avoid selecting anything but the graphics you want.


With the map layer selected, choose Edit > Select all, and then use the keyboard shortcut F8 to place all the selected graphics into a movie clip.

You can also draw a selection box around the whole Stage with the Selection tool; choosing Edit > Select makes sure that nothing gets left behind, though.

When all the graphics and text in the background layer are selected, press the keyboard shortcut F8 to convert the graphics to one big movie clip symbol. Call the symbol mcBackground and give it a movie clip behavior. Press OK.


Select the Movie Clip on the Stage and turn on runtime bitmap caching.

Runtime bitmap caching is turned on in the Property inspector and is available only for Flash Player 8 and above. Select the movie clip on the Stage and select the Use Runtime Bitmap Caching check box.


Save the file and choose Control > Test movie to see the animation.

When you test the movie, you'll see no real difference in the animation. However, runtime bitmap caching ensures a better playback performance when the end user's computer is overtasked with other programs.

Macromedia Flash 8. Training from the Source
Macromedia Flash 8: Training from the Source
ISBN: 0321336291
EAN: 2147483647
Year: 2004
Pages: 230
Authors: James English © 2008-2017.
If you may any questions please contact us: