# ExternalInterface and FireFox

**URL:** https://forum.kirupa.com/t/externalinterface-and-firefox/208472
**Category:** web dev
**Created:** [November 29, 2006, 2:29am UTC](https://forum.kirupa.com/t/externalinterface-and-firefox/208472 "2006-11-29T02:29:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)
#### Post date: [November 29, 2006, 2:29am UTC](https://forum.kirupa.com/t/externalinterface-and-firefox/208472/1 "2006-11-29T02:29:37Z")

</div>

Okay, so I’m trying to make a simple script to detect when the mouse leaves the Flash movie for an FAQ article. I’ve done this using onmouseout and onmouseover JS events within an object element. It works perfectly fine in Internet Explorer but not in Firefox. I’m not to experienced in browser scripting since I mainly stick to Flash, so I was hoping that someone could give some help - doesn’t look to be to hard of a problem.

Here is my HTML document:

```auto
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>Detecting When Mouse Leaves Stage</title>
  <script type="text/javascript">    
   function callEIMethod(name, method) {
            window[name][method]();
   }
  </script>
 </head>
 <body>
  <object onmouseout="callEIMethod('mouseLeaveExample', 'mouseLeave')" onmouseover="callEIMethod('mouseLeaveExample', 'mouseEnter')" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="182" height="118" id="mouseLeaveExample" align="middle">
   <param name="allowScriptAccess" value="sameDomain" />
   <param name="movie" value="mouseLeaveExample.swf" />
   <param name="quality" value="high" />
   <param name="bgcolor" value="#ffffff" />
   <embed src="mouseLeaveExample.swf" quality="high" bgcolor="#ffffff" width="182" height="118" name="mouseLeaveExample" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
  </object>
 </body>
</html>

```

And this is the AS in my Flash movie, although I don’t think it’s the problem:

```auto
import flash.external.ExternalInterface;
ExternalInterface.addCallback("mouseLeave", this, function ():Void {
 this.mouseStatus.text = "mouse is out";
});
ExternalInterface.addCallback("mouseEnter", this, function ():Void {
 this.mouseStatus.text = "mouse is in";
});

```
