Import bezier points

how can i translate bezier pen anchor and control Points into drawing API code?

i would like to design my shapes by hand in flash or illustrator, but have the final application draw them on the fly via the drawing api.

the only way i can think of is to create a pen tool/drawing application in flash first, and record as you draw. Does anyone know if this has been done or perhaps an easier solution?