Brushing on a SWF file

Hello everyone :party:

I have a question, actually a problem.
I want to create this Flash Animation where you paint and then when you save it it saves the thing you painted as a PNG file to the database. Not really to the database but to put up a link to the database.

I have two problems…

  1. I don’t know how to create such a SWF file where you can brush.
  2. I don’t know how to save it as a PNG file.

I have no idea about where to start. I’m trying to find some tutorials but haven’t found anything so far.

This is not a homework or anything, it is…hobby let’s say so feel free to help me. Actually, please…

Thank you