I'm trying to 'skin' the ragdoll in the testbed and am having some difficulties. I'm sure it's something really easy but i can't figure it out. I've created the movieclip with linkage as headImage, but it gives an error for addChild(bd.userData) ??
Code:
//head
circ.radius = 12.5 / m_physScale;
circ.density = 1.0;
circ.friction = 0.4;
circ.restitution = 0.3;
bd = new b2BodyDef();
bd.AddShape(circ);
bd.userData = new headImage();
bd.userData.width = circ.radius * 2;
bd.userData.height = circ.radius * 2;
bd.position.Set(startX / m_physScale, startY / m_physScale);
addChild(bd.userData);
var head:b2Body = m_world.CreateBody(bd);
circ.radius = 12.5 / m_physScale;
circ.density = 1.0;
circ.friction = 0.4;
circ.restitution = 0.3;
bd = new b2BodyDef();
bd.AddShape(circ);
bd.userData = new headImage();
bd.userData.width = circ.radius * 2;
bd.userData.height = circ.radius * 2;
bd.position.Set(startX / m_physScale, startY / m_physScale);
addChild(bd.userData);
var head:b2Body = m_world.CreateBody(bd);