372
Working with Movie Clips
Scrolling text field
An application that displays a large amount of text in a scrolling text
field. You can place the text field in a movie clip that you set as scrollable with scrolling
bounds (the
scrollRect
property). This enables fast pixel scrolling for the specified instance.
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
An application with a complex system of overlapping windows. Each
window can be open or closed (for example, web browser windows). If you mark each window
as a surface (set the
cacheAsBitmap
property to
true
), each window is isolated and cached.
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.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...