View Full Version : Rotation

01-22-2011, 05:02 AM
I have an object, the center of the object I believe is the rotation point. When I click transform and edit the rotation properties on the right side to like 55 degrees then it works, it rotates from the point it's suppose to and looks great.

The problem is when I use AS .rotation on the object, I have no idea where it's rotating from and it's going all over the freaking place. I assumed it would rotate from the same rotation point as the transform tool rotates the object from. I also assumed 0-360 was the options for rotation.

What am I doing wrong? from the looks of it's odd rotation I can't even tell where it's centering.

I'm using this to test it right now, which is run on every frame:

ticker.rotation += 1;

01-22-2011, 05:22 AM
Ok, I found the problem. In flash it rotates from the circle, but in AS it rotates from some + symbol

01-22-2011, 05:35 AM
the little circle is the transform coordinate while the little cross is the object coordinates. Both can be at the same place. 0-360 is the way you rotate in the Flash IDE, by code it's from -180 to 180.

01-22-2011, 02:21 PM
That "some + symbol" is called the "transform coordinate" or "registration mark." It defaults to the upper-left corner of the graphic.

It's not at all a silly thing. Think about it like this, let's say you create a graphic that's the hand of a clock. Would you want it to rotate from the center? Or from the end that's affixed to the center of the clock?

You can move this reg point in the paint window.