Skip to main content
Inspiring
April 19, 2013
Answered

ExternalInterface sometimes...others running local

  • April 19, 2013
  • 1 reply
  • 761 views

So I'm developing web-based training which will eventually go into a learning management system. When it is in the LMS we will use ExternalInterface and Javascript to communicate with Flash.

But sometimes the same course will need to run locally or perhaps be published to a projector.

I'm using ExternalInterface.available to check if it is available. If it isn't then there is no ExternalInterface available then clearly there will be no LMS communication (the projector version).

But the other bits get tricky. When testing locally in the Flash IDE ExternalInterface.available returns true, but there is nothing to actually interface with.

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

Thanks.

This topic has been closed for replies.
Correct answer kglad

create a js function that returns something.  if your ExternalInterface.call fails to return the expected, the swf is not embedded by an html file.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
April 19, 2013

create a js function that returns something.  if your ExternalInterface.call fails to return the expected, the swf is not embedded by an html file.

RothrockAuthor
Inspiring
April 19, 2013

That is what I had done. I was just wondering if anybody had any other good tricks. Thanks.