We have a SWF file that used to save a screenshot of whatever is on it to a file. Something with recent browser and/or Flash version updates has caused that feature to stop working. The method used is as follows:
var jpgSource:BitmapData=new BitmapData(800,700);
[login to view URL](this);
var jpgEncoder:JPGEncoder=new JPGEncoder(98);
var jpgStream:ByteArray=[login to view URL](jpgSource);
var header:URLRequestHeader=new URLRequestHeader("Content-type","application/octet-stream");
var jpgURLRequest:URLRequest=new URLRequest("[login to view URL]");
[login to view URL](header);
jpgURLRequest.method=[login to view URL];
jpgURLRequest.data=jpgStream;
navigateToURL(jpgURLRequest, "_blank");
As you can see, it took a screenshot of the Flash artboard and then sent the JPG stream to a new URL where PHP would spit out this:
$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];
header('Content-Type: image/jpeg');
header("Content-Disposition: attachment; filename=[login to view URL]");
echo $jpg;
This way it would get the browser to download a JPG file from the screenshot of the Flash artboard. It no longer works and we need troubleshooting done. We will provide the SWF, FLA and PHP files to the successful bidder.
Hi! Looking at the code, it should work. If you award me the project and sent files, I'll definately make it work again within 1-2 hours.
Regards,
Konstantin.
Hello. I have similar script that saves image in server and it works. I think, I can help you to fix your problem. I have rich experience working with Flash and ActionScript 3.0. Thanks