Skip navigation
Currently Being Moderated

how to download image without mouseClick.

May 22, 2012 5:35 AM

i am trying to download image to local but i facing some issues.

this code is working in flash.if i put into website this is not working.

if i add to button click that is working.

how to download image without mouseClick.

 

var imgPath:String = "http://site.com/pod/logo.jpg";
var URLrequest:URLRequest = new URLRequest(imgPath);
var downloadFile:FileReference = new FileReference();
 
 try{
          downloadFile.download(URLrequest);
          tracetxt.text = "yes";
}
catch(error:Error)
{
          tracetxt.text = "No";
          trace("Unable to download file");
}
 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points