1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...

ExternalInterface not working in Firefox?

Here’s a wierd one. Let’s say you have a flash navigation - one of those old DHTML style drop-down ones, but done in flash and layered over the top of your page content. You can stick the wmode to transparent and have a transparent background for your flash.

That’s dandy - but in most browsers (ie. firefox) you’ll run into problems interacting with the content underneath your flash movie, particulary hyperlinks. Hyperlinks and form fields just become inaccessible. Setting the wmode might make things transparent, but it doesn’t help the ‘click-through’ aspect of transparency. So, what do you do? The solution I’ve been using is a JavaScript function which resizes the flash movie, activated using ExternalInterface.

The problem?

In Internet Explorer, it works fine. JavaScript calls, DOM elements resize. Firefox? No dice.

The solution.

The solution I found has prettymuch baffled me as to why it should work, but it does. Using the fully-qualified class name for ExternalInterface (flash.external.ExternalInterface) solved all of my Firefox woes.

So quite simply - change your ExternalInterface.call(); to flash.external.ExternalInterface.call();

2 Comments »

  1. Oh thank you, that was really, really annoying. It appears to be file-specific, I use ExternalInterface all the time, even have an updated ‘traceLog’ class that automatically adds extended info and traces to both regular trace and Firebug’s console.log() in Firefox, and in this ONE file no matter what I did ExternalInterface would not work.

    All of my other files worked fine, even ones using the same exact class file (added to my main AS2 classpath). Could be something to do with the fact that this FLA was created on a Mac and published on a PC? Not likely but who knows… that’s the only difference I can think of between all of my working files and this one.

    Comment by Tom — 18 January 2008 #

  2. I wouldn’t've thought it could be a Mac / PC issue, both of the files that caused me hassle were created and published on a PC.

    We have had separate issue with flash MovieClip loaders failing, apparently due to the hosting server being unix-based. I wonder if that has any effect on ExternalInterface?

    Comment by James — 19 January 2008 #

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Note: This post is over 9 months old. You may want to check later in this blog to see if there is new information relevant to your comment.