1 Reply Latest reply on Jul 13, 2006 3:21 AM by blemmo

    Get a variable back to its parent during fucntion creation?

    Level 7
      hi,

      how to get a variable back to its parent during a fucntion creation?


      e.g.


      //----------------------------------------------------------------
      var ret:String = "";


      var dataLoader:LoadVars = new LoadVars();
      dataLoader.onData = function (contents) {

      if (contents == undefined) {

      trace("Error: File not found : "+path);

      } else {

      trace(contents);
      }
      }
      dataLoader.load(path);
      //----------------------------------------------------------------


      how to assign "contents" to ret?


      thanks...