When button is dragged button remains on same position (Need help!)

[FONT=“Trebuchet MS”][SIZE=“4”][COLOR=“Blue”]I am using
Flash CS5 with AS3

I have buttons on stage, I want when a button is dragged the button should remain on same position and a line from the right side of button should connect the tip of the mouse pointer and as we move the line will adjust it self at runtime.
After releasing drag the line should disappear.[/COLOR][/SIZE][/FONT]