
One of the things that is available in HTML web pages but usually left out of Flex applications is the ability to save images by right-clicking on them. This is not because it's not possible with Flex - rather it just requires a little extra coding. So I created a simple Flex example that adds the "Save Image As" right-click menu item. Check out the [demo][1] and the [source code][2].

[![Flex Example - Save Image As][3]][1]

This requires Flash Player 10 which allows users to save files generated at runtime on the client-side. I couldn't find the ByteArray containing the original image file loaded by Flash Player so instead I had to read the bytes of the image wrapped in a SWF and slice out the image. I'm not 100% sure that this trick will work for all image formats. So give it a try and let me know what happens.

 [1]: /saveAsImage/saveAsImage.html
 [2]: /saveAsImage/srcview/
 [3]: http://www.jamesward.com/blog/wp-content/uploads/2009/07/SaveImageAs.gif "Flex Example - Save Image As"
