User Guide

MovieClip 919
Example
The following example creates a
triangle movie clip instance dynamically. When you run
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;
};
The MovieClip.getNextHighestDepth() method used in this example requires Flash Player
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth() method.
See also
_rotation (Button._rotation property), _rotation (TextField._rotation
property)
scale9Grid (MovieClip.scale9Grid property)
public scale9Grid : Rectangle
The rectangular region that defines the nine scaling regions for the movie clip. If set to null,
the entire movie clip scales normally when any scale transformation is applied.
When a
scale9Grid property is defined for a movie clip, the movie clip is divided into a grid
with nine regions, based on the
scale9Grid rectangle, which defines the center region of the
grid. The grid has eight other regions:
The area in the upper-left corner outside the rectangle
The area above the rectangle
The area in the upper-right corner outside the rectangle
The area to the left of the rectangle
The area to the right of the rectangle
The area in the lower-left corner outside the rectangle
The area below the rectangle
The area in the lower-right corner outside the rectangle