Button._Rotation - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Button._rotation

Availability
Flash Player 6.
Usage
my_btn._rotation:Number
Description
Property; the rotation of the button, 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
Example
The following example rotates two buttons on the Stage. Create two buttons on the Stage called
and
control_btn
rotating. Then enter the following ActionScript in Frame 1 of the Timeline:
var control_btn:Button;
var my_btn:Button;
control_btn.onRelease = function() {
my_btn._rotation += 10;
};
Now create another button on the Stage called
(so you can see it rotate). Enter the following ActionScript in Frame 1 of the Timeline.
var myOther_btn:Button;
this.createEmptyMovieClip("rotater_mc", this.getNextHighestDepth());
rotater_mc.onEnterFrame = function() {
myOther_btn._rotation += 2;
};
See also
MovieClip._rotation,
my_btn._rotation = 450
. Make sure that
my_btn
TextField._rotation
is the same as
is not perfectly round, so you can see it
my_btn
, making sure it isn't perfectly round
myOther_btn
my_btn._rotation = 90
Button._rotation
.
157

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash mx

Table of Contents