PDA

View Full Version : Rotating objects around a point?



fireseed
03-13-2008, 08:04 PM
Ok, so what we are trying to do is make a sort of sun wheel that is made up of a series of rings that will turn in opposite directions. It's a really simple animation and all the layers are already in the library and alligned proper on the stage. The only problem that comes up, is when we try to make a simple motion tween of any of the wheels spinning in a circle, they somehow move away from the center where they started, and in the end the entire animation breaks apart.
Just to make something spin on a spot, that's it.
I know there has to be a simple explanation.
Please.

NTD
03-13-2008, 08:07 PM
Hi,

Movieclips have a rotation property that can be manipulated with an enterframe event. Keep in mind that the auto registration point is the top left corner of a movieclip. In order for it to rotate around it's center, the registration point needs to be moved to the center of the movieclip...


this.onEnterFrame=function(){
movieClipName._rotation++;
}


NTD