'Save file' using actionScript?

I need to incorporate the facility to save a file in swf or jpeg or bitmap format using actionscript… is that possible?? if so, how?
the file should contain a movieclip that’s on stage… i could convert it to bitmapData and then try saving… or if not that, then atleast the screeshot of the whole movie should get saved…

help??