2 Replies Latest reply on Jun 19, 2008 12:33 PM by Oliver Goldman

    Auto-downloading files to a default location with AIR

      I'm working on an Adobe AIR media browser that will let the user queue up files to download to their computer. What I'd like it to do is let the user set a default directory and then automatically download each file in the queue to that default location.

      What I'm using is something like the attached code below, but it still prompts the user every time a new file in the queue is supposed to start downloading. Is there any way to do this with AIR?


      var urlReq:URLRequest = new URLRequest(data.downloadUrl);
      var fileReference:File = new File(File.desktopDirectory.nativePath);

      fileReference.addEventListener(Event.COMPLETE, loaded);
      fileReference.addEventListener(ProgressEvent.PROGRESS, updateTheProgressBar);