views:

4853

answers:

3

The title sort of explains itself. I am making some 'genrative' artwork in flash. Now I want to save the frame without making a screenshot so-on and sofort. And perhaps one day i would like to save a batch of frames.

Is there an AS3 class/library out there that could help me out ?

A: 

Do you want to save the file to a hard-drive or to a website?

If to a hard-drive, you might have a hard time unless you're open to using Air. Because of the security sandbox of Flash, you can't write arbitrary files to the user's hard disk.

If you absolutely must save it to a user's hard-drive using Flash and not Air, you'll probably have to send the bitmap data to a server-side PHP (or similar) script which will then allow the user to download and save the image in one location or another.

HanClinto
yes i just want to save it to my HD :(
Kasper
it can be done with flash 10! see my answer :)
davr
+7  A: 

Actually, using the just released Flash 10, you CAN save to the HD! It's very handy, for just this situation. It's perfectly secure, because it only lets you save a file after the user clicks 'Save' in the file dialog, you can't just go writing files willy-nilly. Also, there is code out there already written that allows you to take snapshots using BitmapData, and compress to PNG or JPEG. I'd recommend PNG because it's lossless, which is nice for artwork you're creating.

Here's a few relevant links:

davr
Excellent -- I hadn't heard this! I'm glad to have a wrong answer, and happily vote you up. :)
HanClinto
A: 

how to save an animated gif ?