![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/2/38/2388e2db-29fd-4cb4-ba34-dd210e2d1db6/2388e2db-29fd-4cb4-ba34-dd210e2d1db6-bg6b.png)
Macromedia MAX 2005 - Anaheim, CA What’s New In Flash 8
107
You can also find a sample source file that shows you how to apply bitmap caching to
scrolling text. Find the sample source file, flashtype.fla, in the Samples folder on your hard
disk.
• In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\FlashType.
• On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash
8/Samples and Tutorials/Samples/ActionScript/FlashType.
When to avoid using bitmap caching
Misusing this feature could negatively affect your SWF file. When you develop a FLA file that uses
surfaces, remember the following guidelines:
• Do not overuse surfaces (movie clips with caching enabled). Each surface uses more
memory than a regular movie clip, which means that you should only enable surfaces when
you need to improve rendering performance.
A cached bitmap can use significantly more memory than a regular movie clip instance. For
example, if the movie clip on Stage is 250 pixels by 250 pixels in size, when cached it might
use 250 KB instead of 1 KB when it's a regular (uncached) movie clip instance.
• Avoid zooming into cached surfaces. If you overuse bitmap caching, a large amount of
memory is consumed (see previous bullet), especially if you zoom in on the content.
• Use surfaces for movie clip instances that are largely static (nonanimating). You can drag or
move the instance, but the contents of the instance should not animate or change a lot. For
example, if you rotate or transform an instance, the instance changes between the surface
and vector data, which is difficult to process and negatively affects your SWF file.
• If you mix surfaces with vector data, it increases the amount of processing that Flash Player
(and sometimes the computer) needs to do. Group surfaces together as much as possible;
for example, when you create windowing applications.
Runtime Bitmap Caching - Movie Clip and Button Symbols
Runtime bitmap caching lets you optimize playback performance by specifying that a static movie
clip (for example, a background image) or button symbol be cached as a bitmap at runtime. Caching
a movie clip as a bitmap prevents Flash Player from having to continually redraw the image, which
provides a significant improvement in playback performance.
For example, when creating animations with a complex background, you can create a movie clip for
the background. The background is rendered as a bitmap stored at the current screen depth. It can
be drawn very quickly, letting the animation play both faster and more smoothly, because the
background doesn't need to continually be redrawn.
Without the use of bitmap caching, the animation might play back too slowly, because the
background continually would be redrawn from vector data.