PDA

View Full Version : fileReference.download



daidai
December 7th, 2007, 02:04 PM
when i click. the save window opens but the image is not saved, what am I doing wrong? i have uploaded it to a test server by the way and it still doesnt work...

var myImgURL:String = 'http://www.mysite.com/images/image1.jpg';
fileDwnld.addEventListener(MouseEvent.CLICK, function down (evt:Event) {
var fileReference:FileReference = new FileReference( );
var urlRequest:URLRequest = new URLRequest(imgURL);
fileReference.download(urlRequest);
});

daidai
December 13th, 2007, 04:50 PM
nobody any ideas? i can't figure out what's wrong?
thanks
dai