912
ActionScript classes
You recognize a greater performance benefit with a movie clip that would have many
transparent regions if
opaqueBackground
were not set.
Note:
The opaque background region is not matched in a
hitTest()
method that has the
shapeFlag
parameter set to
true
.
Availability:
ActionScript 1.0; Flash Player 8
Example
The following example creates a triangle outline and sets the
opaqueBackground
property to
a specific color:
var triangle:MovieClip = this.createEmptyMovieClip("triangle",
this.getNextHighestDepth());
triangle._x = triangle._y = 50;
triangle.lineStyle(3, 0xFFCC00);
triangle.lineTo(0, 30);
triangle.lineTo(50, 0);
triangle.lineTo(0, 0);
triangle.endFill();
triangle.opaqueBackground = 0xCCCCCC;
If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth()
method, which is
used in this example.
See also
cacheAsBitmap (MovieClip.cacheAsBitmap property)
,
hitTest (MovieClip.hitTest
method)
_parent (MovieClip._parent property)
public _parent : MovieClip
A reference to the movie clip or object that contains the current movie clip or object. The
current object is the object that references the
_parent
property. Use the
_parent
property to
specify a relative path to movie clips or objects that are above the current movie clip or object.
You can use
_parent
to move up multiple levels in the display list, as in the following code:
this._parent._parent._alpha = 20;
Availability:
ActionScript 1.0; Flash Player 5
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...