How to rotate a figure without moving around the stage(actionscript)
- by Mister PHP
package {
import flash.display.MovieClip;
import flash.events.Event;
public class Bullet extends MovieClip {
private var mc:MovieClip;
public function Bullet() {
mc = new MovieClip();
mc.graphics.beginFill(0);
mc.graphics.drawRect(120, 120, 40, 40);
mc.graphics.endFill();
addChild(mc);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(e:Event):void{
mc.rotation += 10;
}
}
}
how can i make the rotation of the circle without moving him around the stage, just staying in the place he was before and just rotate, not moving anywhere is that posible??
if you try this code you'll see that the circle is rotating and moving around the stage, so that i don't want, how can i change this?