title: Pass a callback in ExternalInterface
body: <p>I want to call a Javascript function from Flash, which I can do with <code>ExternalInterface</code>, but the Javascript function takes a callback. Is there a way to give it a Flash callback?</p>
  
  <p>I've thought of something like this:</p>
  
  <pre><code>ExternalInterface.addCallback("foo", function(){...});
  ExternalInterface.call("theFunction", "foo");
  </code></pre>
  
  <p>But that wouldn't work since <code>theFunction</code> would attempt to do <code>foo()</code>, while it should really do <code>swfObject.foo()</code>. The problem is the page and its Javascript are not under my control (though I can request changes if really needed).</p>