MovieClipSprite is jumpy when align set to “center”

Software: Away3D 3.x

eater44, Newbie
Posted: 06 January 2012 10:14 AM   Total Posts: 1

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(001);
 
circle.graphics.endFill();
 
sprite = new MovieClipSprite(circle"center");
 
 
view = new View3D({x275y200camera: new Camera3D()});
 
view.scene.addSprite(sprite);
 
view.render();
 
addChild(view);
 
 
addEventListener(MouseEvent.CLICKclick);
}

private function click(e:Event{
 sprite
.+= 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? smile

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X