mouse

hi
i am able to draw object using mouse and able to stick graphic object to it .
but since the object is moving so i am not able to update its graphic position along with object..what i am doing wrong

i am calling this on mouse press
//////////////////////
var brick:Brick=new Brick();
brick.x=body.GetPosition().x* 50;
brick.y=body.GetPosition().y* 50
brick.scaleX=_halfwidth*2
brick.scaleY=_halfheight*2
brick.rotation = body.GetAngle() * (180/Math.PI);

addChild(brick)
/////////////////////////////////////////////////////
and this in update function
/////////////////////

for (var body:b2Body = world.GetBodyList(); body; body = body.GetNext()){

if (body.m_userData) if (body.m_userData is Sprite){


var spr:Sprite = body.m_userData as Sprite;

spr.x = body.GetPosition().x * 50;
spr.y = body.GetPosition().y * 50;
spr.rotation =body.GetAngle() * (180.0/Math.PI);
spr.alpha=1
if(Input.isKeyPressed(32))
{spr.alpha=0

//prevBody=null

}
}


}
///////////////////////////////////
Thanks

Original thread: https://box2d.org/forum/viewtopic.php?t=2135