Removing bodies ect

Firstly please excuse my newbieness.

I have been playing around with Box2D for a little while now and it is slowly starting to make sense. Just wondering if someone could give me a nudge in the right direction with this.

I am just trying to remove a body which has a graphic attached to it via bodyDef.userData

I am trying to achieve this when the body is clicked upon using a GetBodyAtMouse function.

Here is what I have so far:

Code:
public function on_mouse_down(evt:MouseEvent):void {
var body:b2Body = GetBodyAtMouse();
m_world.DestroyBody(body);
body = null;
}


Which appears to remove the body but does not remove the attached graphic.

What am I missing? Some kind of removeChild call to remove it from the display list? If so, how do I reference the attached graphic?

I have read the manual but this is a pretty steep learning curve for me and not all of it makes to me sense just yet.

Any help greatly appreciated!

thanks
well this doesn't have that much to do with box2d as general as3 usage.

All you need to do is, as you said, remove the graphic via the removeChild function. How you referance to the right child is up to you. You could either get it from the userdata, or as your using a mouse click to remove, find the graphic the mouse clicked on.

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