I have created a painting app and when the user want's to save his drawing he simply hits the save button and a dialog pops up - or should do.
When testing locally on dev machine it's no problem but whenever the app is loaded in a browser it won't work. Even if I load the local SWF file in a browser it won't work.
The following code is what I use to save the file and as said it works fine locally but whenever it goes into a browser it dosen't.The save dialog simply never pops up.
Any suggestions?
var bitmapData:BitmapData = new BitmapData(canvas.width, canvas.height);
bitmapData.draw(canvas);
var jpg:JPEGEncoder = new JPEGEncoder(100);
var ba:ByteArray = jpg.encode(bitmapData);
file = new FileReference();
file.addEventListener(Event.COMPLETE, fileSaveComplete);
file.addEventListener(IOErrorEvent.IO_ERROR, error);
file.save(ba, 'FileName.jpg');
Running FlashPlayer 11 and compiling to 10.2 BTW.