I need the user of my Flex application to be able to save a snapshot of part of the UI to a local jpg file. I got the screenshot part down – can generate an image out of any given control. However, the only way I see to let the user save the image locally is to send to my server which would return it with the appropriate Content-Disposition.
I really hope I can avoid this silly round-trip to the server. Any ideas?
You can avoid this round trip if you are targeting only Flash player 10. The
FileReferenceclass FP10 has a save method that lets you save a file to local machine; of course you still need the user’s confirmation to do it.