2

I have a function defined in JavaScript like so:

function fadeBack() {
    alert("fadeBack called");
};

I call that function from my Flash file like so:

import flash.external.*;
flash.external.ExternalInterface.call("fadeBack");

This works in both Safari and Chrome, but for some reason Firefox won't ever call the function. Still, I can't figure this out. How can I fix it?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
rjk
  • 49
  • 1
  • 6

3 Answers3

1

Make sure you have the following parameter set in your HTML or JS embed:

allowScriptAccess="always"
Justin Putney
  • 752
  • 1
  • 5
  • 16
0

This could be due to the lack of an <embed> tag. If you are using SWFObject 2, it no longer adds the <embed> tag inside the <object> tag. I believe that using ExternalInterface in Firefox requires the <embed>.

Alex Hofsteede
  • 251
  • 2
  • 5
0

I had the identical problem in Firefox. After I updated to FireFox 6.02, the problem went away - your code should work fine in version 6.02. I cannot confirm in which version of Firefox this issue was resolved.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Zunandi
  • 164
  • 11