The circle will stick to the line

i hav a line and a circle.
i want wherever i drag the line,the circle which is on the line will follow it.
How can i do that?
please drop me an example or actionscript…
thankx