1 Reply Latest reply on Sep 3, 2007 3:21 AM by Greg Dove

    ExternalInterface class and Javascript errors

    Level 7
      Hi all,

      I have a media player that can be controlled via javascript using the
      ExternalInterface class.

      It all seems to work on my browser (IE7), and I've also tested it on my
      laptop with IE6.

      The client has Firefox and IE6 to but says there are Javascript errors
      appearing. (not sure exactly what the errors are at the moment).

      The test player is at http://www.fullsizemedia.co.uk/mp3/

      Does anyone else get these errors? And does anyone know what might be
      causing them?

      It's just annoying as I cant seem to see them.

      Thanks for the help.


        • 1. Re: ExternalInterface class and Javascript errors
          Greg Dove Level 4
          I can confirm that there are errors appearing in firefox.
          The cause seems to be the embedding method. There's a conflict between the overlapping object and embed embedding methods when your javascript is attempting to access the swf object in the page. Perhaps there's a way to code around this in your javascript getFlashMovie function so that it correctly returns the reference to the embedded swf for non-IE browsers. I don't know enough js to let you know how to change that to fix it.

          I would use SWFObject to fix this. It will just result in a single embedding method and if that is the case then your existing code works (I tested this by editing the html and just using <embed> in firefox - instead of <object> wrapping the <embed>). I recommend that you install Firefox with the firebug plugin. Its a great way to test javascript and allowed me to understand this problem (and verify the solution) very quickly.