1

What I'm looking for is JavaScript function which behaves exactly as ExternalInteface.available() in Flash.

Thanks.

1
  • JavaScript is not written to be aware of or geared around any specific plugins. JavaScript allows you to dynamically manipulate the DOM, thereby allowing you to potentially inject "embed" or "object" tags indicating that the browser should then run some plugin code in that area on the page. Long and short the SWFObject.js file gives a wrapper of functionality around swf files for use in JS code.google.com/p/swfobject/source/browse/trunk/swfobject/src/… I believe it's the closest to an answer possible. Commented Jun 19, 2013 at 17:17

1 Answer 1

2

That doesn't make sense. The page loading the SWF is the ExternalInterface.

Indicates whether this player is in a container that offers an external interface.

Sign up to request clarification or add additional context in comments.

5 Comments

Adobe's recommendations is always check available() before using ExternalInterface. I just want to show user message that his browser doesn't support ExternalInterface using HTML/JavaScript. "Before you execute code that uses the ExternalInterface API, you should check whether the browser supports it. You do this by using the available property of the ExternalInterface object in your application."
@FredK You can look here for the browsers that don't support the API. It's a pretty short list of browsers that aren't used anymore.
Thanks for the link. Checking browser version is what I'm going to do if there is no simpler solution (working with mobile browsers).
@FredK If you're concerned about mobile, you can use SWFObject to determine whether Flash is even supported (which it's not on pretty much all mobiles as far as I am aware).
Fred K, you're pretty safe to assume that flash is not supported on mobile (in the browser). Although this isn't 100% true, it's on 0 (un-jail-broken) iOS devices and wasn't on my HTC MyTouch 3G Android 1.6-2.2 and isn't on my Galaxy Nexus with 4.2.2 running so if you're trying to support that subset of Android 2-3 devices I don't exactly understand why? Going forward flash in browser on mobile is a no go since Android has dropped support :(.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.