I have a dynamic body in name and want to make its x position follow the mouse, is this possible.
player = new Body(BodyType.DYNAMIC);
player.shapes.add(new Polygon(Polygon.rect(400, 350, 100, 150)));
player.shapes.add(new Polygon(Polygon.rect(435, 450, 20, 150)));
player.shapes.add(new Polygon(Polygon.rect(380, 600, 150, 20)));
player_mc = new MovieClip(Assets.tb.getTextures("player"));
player.userData.graphic = player_mc;
player.space = space;
addChild(player.userData.graphic);
The suggested way would be to use a constraint.
See how it is done in the FixedDragging sample: http://napephys.com/samples.html#swf-FixedDragging (View source with .as/.hx tabs at top)