actionscript 3 - Flash AS3 FileReference.save() not working on Android AIR -
i have following code save movieclip png image:
download_btn.addeventlistener(touchevent.touch_end, function(){ if(currentimage == andy_thumb){ savepicture(movieclip(parent).andy, 'andy'); } if(currentimage == tilly_thumb){ savepicture(movieclip(parent).tilly, 'tilly'); } if(currentimage == trunk_thumb){ savepicture(movieclip(parent).trunk, 'trunk'); } }); function savepicture(mc:movieclip, charname:string):void { var bmd:bitmapdata = new bitmapdata( mc.width, mc.height ); var bounds:rectangle = mc.getbounds(mc); bmd.draw(mc, new matrix(1,0,0,1,-bounds.left, -bounds.top)); var file:filereference = new filereference(); file = new filereference(); file.save(pngencoder.encode(bmd), charname+'.png'); }
this works fine when debug on computer. when using tablet, download dialogue box opens, when click "ok" after specifying file location download to, doesn't save file.
any idea's why?
thanks.
Comments
Post a Comment