Before using External Interface to call scripts within the wrapping html, its recommended to make sure the swf is nor running outside of a browser or that js is truely available.
ExternalInterface.available returns if flash is capable of using the browers external scripting engine – it will not however determing if JS has been disabled in the browser.
Here’s a quicky little function that will:
function JSAvailable():Boolean { if (ExternalInterface.available) { if (ExternalInterface.call("Function(\"return true;\")")) { return true; } } return false; }
Leave A Comment