flash externalinterface :works in IE , not in firefox

Posted on 2009-12-28
Last Modified: 2013-11-11
Hello experts
I have done a very simple flash swf (as3) that plays an mp3 and have added an extranelInterafce

Works great with IE but does not work with firefox 3.6 !
Gives me:
document.getElementById("mp3").playMP3 is not a function

Any clue ?
<!-- saved from url=(0013)about:internet -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" xml:lang="en" lang="en">


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />



<body bgcolor="#ffffff">

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=",0,0,0" id="mp3" width="10" height="10" align="middle">

<param name="allowScriptAccess" value="always" />

<param name="movie" value="mp3.swf" />

<param name="quality" value="high" />

<param name="bgcolor" value="#ffffff" />

<embed src="mp3.swf" quality="high" bgcolor="#ffffff" width="10" height="10" swLiveConnect="true" id="mp3" name="mp3" align="middle" allowScriptAccess="always" 

type="application/x-shockwave-flash" pluginspage="" />


  <input type="button" name="button" id="button" value="Button"  onclick="document.getElementById('mp3').playMP3()"/>




Open in new window

Question by:yarekGmail
    LVL 22

    Expert Comment

    by:Ferruccio Accalai
    I don't know how this could be related to Delphi, anyway about the Firefox issue I know that using the fully-qualified class name for ExternalInterface (flash.external.ExternalInterface) should solve the Firefox problem.

    So try changing your

    Author Comment

    Delphi : sorry, I think the wbesite kept my last selection !

    Still does not wrok with firefox ! Totally crazy !

    I have attached the HTML, SWF and teh FLA source code.
    LVL 19

    Accepted Solution

    the problem is you're accessing the flash object improperly.

    flash is browser independant, and the fully qualified class name is not required.

    this is fine:


    but your javascript attempt to access the flash object will only grab it in IE.

    change your html for the flash object to the following snippet:
    <object id="mp3" type="application/x-shockwave-flash" data="mp3.swf" width="10" height="10"> 
      <param name="allowScriptAccess" value="always" />
      <param name="movie" value="mp3.swf" />
      <param name="quality" value="high" />
      <param name="bgcolor" value="#ffffff" />

    Open in new window


    Expert Comment

    My question is exactly same. But the "Accepted Solution" does work? I copy and tried, it make no difference. What is the magic? I do can access my flash object, but I cannot access its ExternalInterface function.
    Another thing I noticed is that if open the HTML from local, then it works fine. But after I put it on web server, then it stop working in FF (I tried both 3.6 and 3.0). But everything is under same domain
    It works in IE always.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
    Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now