
MovieClip._rotation Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
694
|
ActionScript Language Reference
MovieClip._rotation Property
rotation, in degrees, of a clip or movie
Flash 4
read/write
mc._rotation
Description
The floating-point _rotation property specifies the number of degrees mc is rotated from
its original orientation (if
mc is not a main movie, the original orientation is that of mc’s
symbol in the Library). Both authoring-time and programmatic adjustments are reflected
in
_rotation. Numbers in the range of 0 to 180.0 rotate the clip clockwise. Numbers in the
range of 0 to –180.0 rotate the clip counterclockwise. The same effect is achieved when
rotating a clip
n degrees or n–360 degrees (where n is positive). For example, there is no
difference between rotating a clip +299.4 degrees or –60.6 degrees. Likewise, when
n is
negative, there is no difference between
n degrees and n+360 degrees. For example, rotating
a clip –90 degrees is the same as rotating it +270 degrees.
When
_rotation is set to anything outside the range of –180 to 180, the value is brought
into the proper range according to the equivalent of the following calculation:
x = newRotation % 360;
if (x > 180) {
x -= 360;
} else if (x < -180) {
x += 360;
}
_rotation = x;
Bugs
In Flash Player 4, setting the _rotation of a clip reduces the scale of that clip by a fractional ...