Two Objects conected by a dinamic line + physics of the line

Hi

I have two Movie clips, and I have to conect them with a dinamic line, like a rope. The movie clip A will be interactive with the mouse, changing X and Y positions, so the line should act like a rope.

Does anybody knows some code to do that or have a example?