how to create a '.png' image from a flash object.
Currently I am using 'OpenFlashChart' in my application, which works good and shows me a flash of bar or pie chart, now what i want to do is the store a '.png' image of this chart in a folder.
NOTE : I have removed the 'ofc_upload_image.php' file from this library as it has certain vulneribilities. So, basically what i want is to convert a flash into a '.png' image.
Thanks in advance
Taking a screenshot in a SWF and encoding it is fairly straightforward:
You can replace the
Rectangle
params as necessary to capture only a certain portion (e.g. your chart).I'm going to assume you are wanting to upload the image to your server, in which case you can use a
URLLoader
to send the byte array containing the encoded PNG data: