AS3 ExternalInterface works in IE but not Firefox

Posted by user567602 on Stack Overflow See other posts from Stack Overflow or by user567602
Published on 2011-01-07T23:46:24Z Indexed on 2011/01/07 23:54 UTC
Read the original article Hit count: 212

Hi all,

I am trying to execute an AS3 function from my javascript using the ExternalInterface. Seems to work fine in IE, but firefox is always returning javascript error method undefined.

I have been Googling this for ages and eliminated the following possibilities:

1) Some people say you need to have an embed tag inside your object tag, so added one - no luck.

2) Many people say that you need to make sure that your flash is loaded before calling the javascript. Well my call is after pressing a link on the page. I am always using the flash application first and only pressing the link at the end.

3) Then I thought that maybe it is a security problem so added the following:

try { ExternalInterface.addCallback("test", testing); trace("added callback"); } catch (error:SecurityError) { trace("Security Error:"+error.message); } catch (error:Error) { trace("Error:"+error.message); }

But it prints out "added callback" :(

Anyone else have any ideas what else could I possible try? I am running the latest Firefox and FlashPlayer 10.

Regards,

Olli

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about firefox