0 Replies Latest reply on Sep 8, 2006 3:20 AM by paulw111

    open/save a local file...  issues!

    paulw111
      Hi,
      I'm working on a flash 8 based CD projector (after finally getting sick of using Director MX) and I want a button to open a dialog box to let the user open/save a file from the CD. I have some code which works fine for downloading files from a remote URL but it doesn't like relative paths for opening files from the same location as the projector:

      on (release) {
      import flash.net.FileReference;

      var fileRef:FileReference = new FileReference();
      fileRef.addListener(listener);
      var url:String = "test.jpg";
      if(!fileRef.download(url, "test.jpg")) {
      trace("dialog box failed to open.");
      }
      }

      with test.jpg being the name of the file to be downloaded. The only other method I have seen to do this uses:
      fscommand ("exec", "open_jpg.bat");
      but that would require a seperate .bat file for each file to be opened which is messy to say the least!
      thanks in advance for any help!