For examples of scrolling movie clips, see
in the ActionScript 2.0 Language Reference. For information on alpha channel
property)
masking, which requires you to set the
channel masking" on page
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.
Setting the background of a movie clip
You can set an opaque background for a movie clip. For example, when you have a
background that contains complex vector art, you can set the
a specified color (typically the same color as the Stage). The background is then treated as a
bitmap, which helps optimize performance.
When you set
cacheAsBitmap
specified color, the opaqueBackground property allows the internal bitmap to be opaque and
rendered faster. If you do not set
adds an opaque vector-square shape to the background of the movie clip instance. It does not
create a bitmap automatically.
The following example shows how to set the background of a movie clip to optimize
performance.
To set the background of a movie clip:
1.
Create a new Flash document called background.fla.
2.
Draw a blue circle on the Stage.
3.
Select the blue circle, and then select Modify > Convert to Symbol.
4.
Select the Movie clip option, and then click OK.
scrollRect (MovieClip.scrollRect
cacheAsBitmap
377.
to
, and also set the
true
cacheAsBitmap
About caching and scrolling movie clips with ActionScript
property to
true
opaqueBackground
opaqueBackground
to true, the
opaqueBackground
, see
"About alpha
property to
property to a
property
375
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?
Questions and answers