Clear (Movieclip.clear Method); Createemptymovieclip - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
The following example applies a drop shadow to a movie clip instance. It then traces the value
of the
cacheAsBitmap
import flash.filters.DropShadowFilter;
var container:MovieClip = setUpShape();
trace(container.cacheAsBitmap); // false
var dropShadow:DropShadowFilter = new DropShadowFilter(6, 45, 0x000000, 50,
5, 5, 1, 2, false, false, false);
container.filters = new Array(dropShadow);
trace(container.cacheAsBitmap); // true
function setUpShape():MovieClip {
var mc:MovieClip = this.createEmptyMovieClip("container",
this.getNextHighestDepth());
mc._x = 10;
mc._y = 10;
var w:Number = 50;
var h:Number = 50;
mc.beginFill(0xFFCC00);
mc.lineTo(w, 0);
mc.lineTo(w, h);
mc.lineTo(0, h);
mc.lineTo(0, 0);
mc.endFill();
return mc;
}
See also
opaqueBackground (MovieClip.opaqueBackground property)
(MovieClip.cacheAsBitmap property)

clear (MovieClip.clear method)

public clear() : Void
Removes all the graphics created during runtime by using the movie clip draw methods,
including line styles specified with
manually drawn during authoring time (with the Flash drawing tools) are unaffected.
Availability: ActionScript 1.0; Flash Player 6
property which is set to
MovieClip.lineStyle()
when a filter is applied.
true
,
. Shapes and lines that are
cacheAsBitmap
MovieClip
847

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF