Let’s make a black circle, turn it into a MovieClipSprite, and render it in a View3D. When you click on the circle, make it a tiny distance on the x-axis and rerender the scene.
public var sprite:MovieClipSprite;
public var view:View3D;
public function BugTest() {
var circle:Sprite = new Sprite();
circle.graphics.beginFill(0x000000);
circle.graphics.drawCircle(0, 0, 1);
circle.graphics.endFill();
sprite = new MovieClipSprite(circle, "center");
view = new View3D({x: 275, y: 200, camera: new Camera3D()});
view.scene.addSprite(sprite);
view.render();
addChild(view);
addEventListener(MouseEvent.CLICK, click);
}
private function click(e:Event) {
sprite.x += 0.0000001;
view.render();
}
Expected behavior: the circle doesn’t move.
Actual behavior: it jumps to a place above and to the left of its original location.
I think this is a problem with sprite.align, because when it is set to “top left”, the problem disappears.
Does this also happen to any of you… out there?