ExternalInterface.addCallback doesn't work on firefox??

Posted by dome on Stack Overflow See other posts from Stack Overflow or by dome
Published on 2010-04-15T16:10:11Z Indexed on 2010/04/15 16:13 UTC
Read the original article Hit count: 422

Filed under:
|
|

i'm trying to call a method inside a flash movie from js, every time the mouse leaves the "div". It works on Internet Explorer, but not in firefox. any ideas?

here is the html script:

<script type="text/javascript">

     window.onload = function(e){

      init();

     }

     function init(){

      document.getElementById('div').onmouseout = function(e) {

       method();
      }

     }

     function method(){
       flashid.anothermethod();
     }
</script>

and the flash script:

import flash.external.ExternalInterface;

function outdiv(){
        //do something;
}

ExternalInterface.addCallback('anothermethod', outdiv);

Any ideas what's wrong?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about actionscript-3