How to make shape rotation at it's center point?
I draw a shape,like follows:
var shape1:Shape;
shape1=draw();
addChild(shape1);
shape1.rotation=50;
private function draw():Shape{
var shape:Shape = new Shape();
shape.graphics.beginFill(0x00FFFF);
shape.graphics.moveTo(200,200);
shape.graphics.lineTo(300, 202);
shape.graphics.lineTo(200, 204);
shape.graphics.lineTo(100, 202);
shape.graphics.lineTo(200, 200);
return shape;
}
Then I want to rotate the shape at it's center point(200,202) by using shape1.rotation=50,but I find the shape don't rotate at the the center of it's shape. How to realize the function which make shape rotate at its center point?
Thanks
