I am creating a painting application in Actionscript (although my question is not Actionscript related). The basic idea is to start painting when the mouse is press
See Efficient Curve Fitting by Sarah Frisken. Also available at the author's page.