Javascript – calling a Flash ExternalInterface with JavaScript

actionscriptactionscript-3flashjavascript

I'm trying to call a function declared with ExternalInterface in a Flash swf, using JavaScript. It worked once, but all of a sudden, it stopped working.

I have a debug version of the Flash Player, but no errors occur in Flash. Not even a "Security Sandbox Error" or something. The only error I get is the following error in JavaScript Error: Error in Actionscript. Use a try/catch block to find error.

I'm using AS3, exporting for Flash Player 10 and testing on Firefox 3/Safari 4, on a Mac.

Any assistance would be greatly appreciated.

Best Answer

Check out ExternalInterface.marshallExceptions. It should allow you to see more details about the error.