title: Returning a variable from an ExternalInterface.call() back into Flash
body: <p>I'm calling a JS function with ExternalInterface.call and trying to get a return value inside Flash. When I trace out the op variable I get 0 instead of 500. Is there something wrong with my embed code?</p>
  
  <p>Embed code:</p>
  
  <pre><code>&lt;embed src="/sites/default/files/flash/flashgame/Preload.swf" width="975" height="572" align="middle" FlashVars="entry=login" quality="high" bgcolor="#ffffff" name="slider" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function get_current_points(){
      // Hardcoded return value for testing
      return 500;
  }
  </code></pre>
  
  <p>Actionscript:</p>
  
  <pre><code>var op:Number = ExternalInterface.call("get_current_points") as Number;
  </code></pre>