ExternalInterface sometimes... other local running

So I develop training on the web that will come eventually in a learning management system. When it is in the LMS, we use ExternalInterface and Javascript to communicate with Flash.

But sometimes the same course must run locally or publish possibly to a projector.

I use ExternalInterface.available to check if it is available. If it isn't then there is no ExternalInterface available then clearly there is no LMS communication (light version).

But the other bits is complicated. When you test locally in the Flash IDE ExternalInterface.available returns the value true, but there is nothing really to interface with.

Any suggestions on how to know if it actually is javascript to help me to get out and communicate with the LMS?

Thank you.

Create a js function that returns something.  If your ExternalInterface.call("saveglobalscore",score) does not return the expected, the swf file is not embedded by a html file.

Tags: Adobe Animate

Similar Questions

Maybe you are looking for