Follow mouse along X-cord

Does anyone know how to make a small graphic follow the mouse along a X-cord or a line.

a bonus would be for it to ease in and/or out.

If anyone knows how, or have an .fla example, me would be very happy.

Thanks.

Using Flash MX Actionscript

Try searching the tutorials. I know that it’s already there!

The basic script is

Flash 5:
[AS]
onClipEvent(enterFrame){
_x += (_root._xmoouse - _x/3;
}
[/AS]

Try the tutorials, you’ll learn faster there!