3 Replies Latest reply on Nov 18, 2007 2:38 PM by kglad

    generic text file loader function

      In AS3 I am trying to create a function that will accept a source string that contains the name of a text file and a target string to load the text into when it is loaded. I have:
      function processText(tSource:String,tTarget:String):void {
      var textReq:URLRequest = new URLRequest(tSource);
      var textLoad:URLLoader = new URLLoader();
      textLoad.addEventListener(Event.COMPLETE, textReady);

      I don't know how to write the textReady handler so that it can access the target string.

      Any help would be appreciated.

      The problem is that the textReady function