Setmask (Movieclip.setmask Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example creates a
movie clip instance dynamically. When you run
triangle
the SWF file, click the movie clip to rotate it:
this.createEmptyMovieClip("triangle", this.getNextHighestDepth());
triangle.beginFill(0x0000FF, 100);
triangle.moveTo(100, 100);
triangle.lineTo(100, 150);
triangle.lineTo(150, 100);
triangle.lineTo(100, 100);
triangle.onMouseUp= function() {
this._rotation += 15;
};
See also
,
_rotation (Button._rotation property)
_rotation (TextField._rotation
property)

setMask (MovieClip.setMask method)

public setMask(mc:Object) : Void
Makes the movie clip in the parameter
a mask that reveals the calling movie clip.
mc
The
method allows multiple-frame movie clips with complex, multilayered
setMask()
content to act as masks (which is possible by using mask layers). If you have device fonts in a
masked movie clip, they are drawn but not masked. You can't set a movie clip to be its own
mask, for example,
.
my_mc.setMask(my_mc)
If you create a mask layer that contains a movie clip, and then apply the
method
setMask()
to it, the
call takes priority and this is not reversible. For example, you could have
setMask()
a movie clip in a mask layer called
that masks another layer that contains another
UIMask
movie clip called
. If, as the SWF file plays, you call
,
UIMaskee
UIMask.setMask(UIMaskee)
from that point on,
is masked by
.
UIMask
UIMaskee
To cancel a mask created with ActionScript, pass the value
to the
method.
null
setMask()
The following code cancels the mask without affecting the mask layer in the Timeline.
UIMask.setMask(null);
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Lite 2.0
MovieClip
511

Advertisement

Table of Contents
loading

Table of Contents