Moving sprite along drawn line

hi,

I want to the user to be able to draw a line and then have a sprite follow the line as its path. Also, it would be nice if the line could be cleaned up after the user draws it with his/her mouse so that it is made up of clean curves/spline.

if you know of any code examples or finished flash examples that have this functionality please post. any help greatly appreciated.

thanks