Im testing a program in FlashDevelop, which uses Flash player 10. Need externalInterface to work, but on running this simple test program, it displays "ExternalInterface is not available". What might be the problem here? How do I get ExternalInterface working?
http://blog.flexexamples.com/2008/03/10/checking-to-see-if-the-externalinterface-api-is-available-in-flex/ -->
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function init():void {
if (ExternalInterface.available) {
ExternalInterface.call("alert",
"ExternalInterface is available");
} else {
Alert.show("ExternalInterface is not available");
}
}
]]>
</mx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Button id="button"
label="ExternalInterface.available"
click="init();" />
</mx:ApplicationControlBar>
P.s - By the way, this script shows "External Interface is available" when I run it in my browser. Its only when I run it in Flash Player 10, that it is not available.