title: Returning from Flex/ActionScript 3 Responder objects
body: <p>I need to return the value from my Responder object. Right now, I have:</p>
  
  <pre><code>private function pro():int {
      gateway.connect('http://10.0.2.2:5000/gateway');
      var id:int = 0;
      function ret_pr(result:*):int {
         return result
      }
      var responder:Responder = new Responder(ret_pr);
      gateway.call('sx.xj', responder);
      return id
  }
  </code></pre>
  
  <p>Basically, I need to know how to get the return value of ret_pr into id or anything that I return from that function. The responder just seems to eat it. I can't use a public variable somewhere else because this will be running multiple times at once, so I need local scope.</p>