1 Reply Latest reply on Aug 18, 2008 6:39 AM by Newsgroup_User

    giving a file to download

    nadpal Level 1
      hi everyone,
      I want to add code to let the user download a file from the flex app when he click on an image, I used the following code and placed the Presentation1.ppt in the same folder as the swf file.
      var request:URLRequest = new URLRequest("Presentation1.ppt");
      var fileRef:FileReference = new FileReference();
      fileRef.download(request,"Presentation1.ppt")
      but it didnt work gave me the error
      Error #2039: Invalid remote URL protocol. The remote URL protocol must be HTTP or HTTPS.
      can someone help me on this

      thanks
        • 1. Re: giving a file to download
          Level 7

          "nadpal" <webforumsuser@macromedia.com> wrote in message
          news:g8b4m5$270$1@forums.macromedia.com...
          > hi everyone,
          > I want to add code to let the user download a file from the flex
          > app
          > when he click on an image, I used the following code and placed the
          > Presentation1.ppt in the same folder as the swf file.
          > var request:URLRequest = new
          > URLRequest("Presentation1.ppt");
          ^this needs to be a valid URL, not the name of a ppt file ;-)

          > remote URL protocol must be HTTP or HTTPS.
          > can someone help me on this
          >
          > thanks
          >
          >