View Full Version : How can I get flash to work with FireFox?

9 Jun 2009, 5:06 AM
Hello, I have tried to create a widget to embed the Wimpy media player. It works fine in IE but with FireFox does not work.

After inspecting the element using the web developer plugin with FireFox I see that the embed tag is not used. Here is the code produced (as can be seen by the "Inspect Element" tool)

<object id="extswfxauto556" height="100%" width="100%" type="application/x-shockwave-flash" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" data="flash/wasp.swf" style="visibility: visible;">
<param name="loop" value="false"/>
<param name="menu" value="false"/>
<param name="quality" value="high"/>
<param name="scale" value="noscale"/>
<param name="salign" value="lt"/>
<param name="id" value="extswfxauto556"/>
<param name="allowScriptAccess" value="always"/>
<param name="wmode" value="transparent"/>
<param name="flashvars" value="....."/>
Listed below is the player component I have created:

package example.client.widgets;

import com.extjs.gxt.ui.client.widget.flash.FlashComponent;
import com.extjs.gxt.ui.client.widget.flash.SwfObject.SwfConfig;

public class MediaPlayerWidget extends FlashComponent {

public static final String LICENSE_KEY = "...";
public static final String SKIN_KEY = "...";
public static final String PLAYER_URL = "flash/wasp.swf";
public static final String BG_COLOR = "FFFFFF";
public static final String WIDTH = "200";
public static final String HEIGHT = "26";

private String url;

public MediaPlayerWidget (String url) {
this.url = url;

protected void injectFlash(SwfConfig config) {
config.addAttribute("classid", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000");
config.addAttribute("codebase", "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0");

config.addParameter("movie", PLAYER_URL);
config.addParameter("loop", "false");
config.addParameter("menu", "false");
config.addParameter("quality", "high");
config.addParameter("scale", "noscale");
config.addParameter("salign", "lt");

config.addFlashVar("r", LICENSE_KEY);
config.addFlashVar("f", url);
config.addFlashVar("me", "0");
config.addFlashVar("s", "0");
config.addFlashVar("h", "0");
config.addFlashVar("waspSkin", SKIN_KEY);

}Can anyone help me to understand how to make the flash component also write the embed tag? Thank you very much.