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?
Embed code:
<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" />
JS:
function get_current_points(){
// Hardcoded return value for testing
return 500;
}
Actionscript:
var op:Number = ExternalInterface.call("get_current_points") as Number;