Create swf dynamically

Hi,

I would like to create swf dynamically, let me explain my basic requirement.

I have an interface wherein user writes a message for another user, this is as if the user is writing on paper. This has to be saved as swf in the server, I was exploring whether red 5 can help me achieve that. I don’t find any resource regarding that, I just need to find a way to save the swf as animation.

Can any one explain or point me to the location where I can find required help. Thanks in advance