About Caching And Scrolling Movie Clips With Actionscript - MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

11.
Select Control > Test Movie to test the document.
When you click the instances on the Stage, they swap depths. You'll see the two instances
change which clip is on top of the other clip.
For more information, see
ActionScript 2.0 Language Reference.
About caching and scrolling movie clips
with ActionScript
As your designs in Flash grow in size, whether you are creating an application or complex
scripted animations, you need to consider performance and optimization. When you have
content that remains static (such as a rectangle movie clip), Flash does not optimize the
content. Therefore, when you change the position of the rectangle movie clip, Flash redraws
the entire rectangle in Flash Player 7 and earlier.
In Flash Player 8, you can cache specified movie clips and buttons to improve the
performance of your SWF file. The movie clip or button is a surface, essentially a bitmap
version of the instance's vector data, which is data that you do not intend to change much
over the course of your SWF file. Therefore, instances with caching turned on are not
continually redrawn as the SWF file plays, which lets the SWF file render quickly.
You can update the vector data, at which time the surface is recreated. Therefore, the
vector data cached in the surface does not need to remain the same for the entire SWF
file.
You can use ActionScript to enable caching or scrolling and to control backgrounds. You can
use the Property inspector to enable caching for a movie clip instance. To cache movie clips or
buttons without using ActionScript, you can select the Use runtime bitmap caching option in
the Property inspector instead.
swapDepths (MovieClip.swapDepths method)

About caching and scrolling movie clips with ActionScript

in the
369

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents