_rotation (MovieClip._rotation property)

public _rotation : Number

Specifies the rotation of the movie clip, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range; for example, the statement my_mc._rotation = 450 is the same as my_mc._rotation = 90. For large values, greater than +/- 720, a multiple of 360 is used.

Availability: ActionScript 1.0; Flash Player 4

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)


Flash CS3