03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}<br />

this.removeMovieClip();<br />

};<br />

bugNum++;<br />

See also<br />

duplicateMovieClip function, createEmptyMovieClip<br />

(MovieClip.createEmptyMovieClip method), duplicateMovieClip<br />

(MovieClip.duplicateMovieClip method), attachMovie (MovieClip.attachMovie<br />

method), swapDepths (MovieClip.swapDepths method)<br />

_rotation (MovieClip._rotation property)<br />

public _rotation : Number<br />

Specifies the rotation of the movie clip, in degrees, from its original orientation. Values from 0<br />

to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise<br />

rotation. Values outside this range are added to or subtracted from 360 to obtain a value<br />

within the range; for example, the statement my_mc._rotation = 450 is the same as<br />

my_mc._rotation = 90. For large values, greater than +/- 720, a multiple of 360 is used.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 4<br />

Example<br />

The following example creates a triangle movie clip instance dynamically. When you run<br />

the SWF file, click the movie clip to rotate it.<br />

this.createEmptyMovieClip("triangle", this.getNextHighestDepth());<br />

triangle.beginFill(0x0000FF, 100);<br />

triangle.moveTo(100, 100);<br />

triangle.lineTo(100, 150);<br />

triangle.lineTo(150, 100);<br />

triangle.lineTo(100, 100);<br />

triangle.onMouseUp= function() {<br />

this._rotation += 15;<br />

};<br />

The MovieClip.getNextHighestDepth() method used in this example requires Flash Player<br />

7 or later. If your SWF file includes a version 2 component, use the version 2 components'<br />

DepthManager class instead of the MovieClip.getNextHighestDepth() method.<br />

MovieClip 929

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!