
Код AS3:
var container:Sprite = new Sprite();
var shape:Shape = new Shape();
shape.graphics.beginFill(0xFF0000);
shape.graphics.drawRect(0,0,100,100);
shape.graphics.endFill();
container.addChild(shape)
// смещаем центр на 0,0
shape.x= -shape.width/2;
shape.y= -shape.height/2;
addChild(container)
container.x=container.y=150;
setInterval(rotate,50);
function rotate () {
container.rotation++;
}