I am wanting to use fileReference to open an OS save dialogue so my users can save jpgs to their hard disks.
I been trying to get this working but I can’t can any one please give me some code or some idea how to get this working.
I just want to be able to click a button and the save dialogue appear asking where to save the file.
Thanks
Sorry got this working now
code for any one who’s interested:
import flash.net.FileReference;
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
var url:String = "http://www.qwerty-design.co.uk/images/jenson1.jpg";
var url2:String = "http://www.qwerty-design.co.uk/images/jenson2.jpg";
oneBtn.onRelease = function() {
if(!fileRef.download(url, "jenson1.jpg")) {
trace("dialog box failed to open.");
}
}
twoBtn.onRelease = function() {
if(!fileRef.download(url2, "jenson2.jpg")) {
trace("dialog box failed to open.");
}
}