Drawing application with playback

Hi guys,
I was on this site http://sketchfu.com where you can draw an image and then post it and you will be able to replay a movie of how the image was drawn. I have seen tutorials for creating flash drawing applications. Does anyone have an idea how to create a playback functionality for a drawing application? What information would you store and how would you store it?

:stare::stare::stare: