PDA

View Full Version : [AS3] Rotate to mouse & x/y axis


timf999
02-27-2009, 07:13 AM
I know how to get things to rotate to the mouse. The thing I would like to ask is: which movable 'spot' controls rotation point and which x/y axis?

Thanks in advance

kkbbcute
02-27-2009, 07:26 AM
Oh, you mean to ask what is the centre of rotation, as in the anchor point for rotation?

You know when you open any MC in Flash, you should see a really small cross like thing, that is the centre of rotation for actionscript based rotation for your MC.

timf999
02-27-2009, 05:53 PM
Thanks, that works fine. But I have another question :p

I got it to rotate so it points to the mouse. I made the movieclip with the point of it facing 'up' but it rotates 90 degrees out (as if I made it pointing sideways).

also is the anchor point for rotation the same as the point which sontrols x/y axis?

kkbbcute
03-01-2009, 12:09 PM
Thanks, that works fine. But I have another question :p

I got it to rotate so it points to the mouse. I made the movieclip with the point of it facing 'up' but it rotates 90 degrees out (as if I made it pointing sideways).

also is the anchor point for rotation the same as the point which sontrols x/y axis?

Thats because it should be pointing towards the right instead of facing up. And yup, I think so, with reference to your last question.