3 Replies Latest reply on Aug 2, 2006 9:27 AM by kglad

    Download after invent listener........

    Vision Designs

      I've had flash for a weeks now and I seem to have fairly good understanding of the program. On the other hand I'm having a little trouble with certain action scripts. On my project, I have a button that when pressed will start downloading a file to a web visitor. I'm pretty sure I'll need an invent listener for the button. I was able to find out how to start the download when a person enters the actual web page (I would rather them clicking on the button to start the download).This is the code for that:

      import flash.net.FileReference;


      var fileRef:FileReference = new FileReference();
      fileRef.addListener(listener);
      var url:String = " http://www.trance-state.com/Downloads_files/DJ Vision - Back to Basics (Summer Club Mix June 06 www.trance-state.com).MP3";
      if(!fileRef.download(url, "DJ Vision - Back to Basics")) {
      trace("dialog box failed to open.");


      If someone can help with the complete actions scripts to link the button to the download process that would be greatly appreciated.


      Thanks again.