Scrolling text field
field. You can place the text field in a movie clip that you set as scrollable with scrolling
bounds (the
scrollRect
When a user scrolls the movie clip instance, Flash shifts the scrolled pixels up and generates
the newly exposed region instead of regenerating the entire text field.
Windowing system
window can be open or closed (for example, web browser windows). If you mark each window
as a surface (set the
cacheAsBitmap
Users can drag the windows so that they overlap each other, and each window doesn't need to
regenerate the vector content.
All of these scenarios improve the responsiveness and interactivity of the application by
optimizing the vector graphics.
You can find a sample source file that shows you how bitmap caching can be applied to an
instance. Find the file called cacheBitmap.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\CacheBitmap.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/CacheBitmap.
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.
372
Working with Movie Clips
An application that displays a large amount of text in a scrolling text
property). This enables fast pixel scrolling for the specified instance.
An application with a complex system of overlapping windows. Each
property to
), each window is isolated and cached.
true
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?