0 Replies Latest reply on Jan 15, 2007 6:56 AM by frankie_luccini2

    help return value from ExternalInterface

    frankie_luccini2
      adobe's site is only posting examples for ExternalInterface, which
      return values inside of a function.
      this works.....
      import flash.external.ExternalInterface;
      ExternalInterface.addCallback("asFunc", this, xasFunc);
      function xasFunc(str:String):Void {
      _root.testVal.text = str;
      }

      but instead of using the "str" variable inside of the function, i would
      rather return the result, so i can use the "str" variable outside of
      the function. this is the style code i would like to apply, but it does not work.
      something like this......
      import flash.external.ExternalInterface;
      ExternalInterface.addCallback("asFunc", this, xasFunc);
      function xasFunc(str){
      return str;
      }
      xresult = xasFunc(str);
      _root.testVal.text = xresult;


      how can i get the value of "str", but use it outside of the function ???