3 Replies Latest reply on Dec 3, 2006 9:45 AM by kglad

    adding a variable to a listener

    koomisan
      hi
      i am using the fileReference class, and i need to pass a variable to the listeners

      the functions i have at the moment is
      _root["myBtn"+num].onRelease = function() {
      var fileRef:FileReference = new FileReference();
      fileRef.addListener(fileDownloadListener);
      var url:String = " http://.......";
      if (!fileRef.download(url)) {
      trace("dialog box failed to open.");
      }
      };
      fileDownloadListener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number, num):Void {
      trace("onProgress with bytesLoaded: "+bytesLoaded+" bytesTotal: "+bytesTotal);
      }

      what i need is to use the num variable in the fileDownLoadListener...
      anyone know how to do that??
      thanks