This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Etsi tuesta

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Lue lisää

embed flash is not displayed. But it appears after editing html with firebug.

  • 3 vastausta
  • 12 henkilöllä on sama ongelma
  • 12 näyttöä
  • Viimeisin kirjoittaja luke.morton

more options

I have added a embed tag with a .swf file which reproduce a .flv video. The thing is that it works fine in all browser except Firefox. i tried to debug it using firebug, and what i found is, that aditing the embed using firebug without modifying the code just adding a space after the embed, the video start displaying.

I have added a embed tag with a .swf file which reproduce a .flv video. The thing is that it works fine in all browser except Firefox. i tried to debug it using firebug, and what i found is, that aditing the embed using firebug without modifying the code just adding a space after the embed, the video start displaying.

Kaikki vastaukset (3)

more options

Can you post a link to that web site or post a relevant part of the code?

more options

this is part of the code:


<object height="200" width="290" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="mediaPlayerIe">
	<param value="Player.swf" name="movie">
	<param value="high" name="quality">
	<param value="objectID=mediaPlayer&confFile=videoConf.xml&media=<data><type>video</type><file><![CDATA[my_video.flv]]></file><image><![CDATA[my_image.jpg]]></image></data>" name="FlashVars">
	<param value="#f4f4f4" name="bgcolor">
	<param value="true" name="menu">
	<param value="transparent" name="wmode">
	<param value="sameDomain" name="allowScriptAccess">
	<param value="true" name="allowFullScreen">
	<embed height="200" width="290" swliveconnect="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="sameDomain" menu="true" flashvars="objectID=mediaPlayer&confFile=videoConf.xml&media=<data><type>video</type><file><![CDATA[my_video.flv]]></file><image><![CDATA[my_image.jpg]]></image></data>" bgcolor="#f4f4f4" wmode="transparent" quality="high" id="mediaPlayerMz" src="Player.swf">
</object>

i hope this can help.

Muokattu , muokkaaja cor-el

more options

I've run into a similar problem with YouTube videos which I've been able to fix with a Greasemonkey script. (Videos on the home page of YouTube lack a wmode attribute and Flash video renders as a grey box without it. I found that by adding wmode through Firebug the video would start to play.)

To get the script to work, I had to force to the browser to reload the element, which is what appears to happen when editing in in Firebug.

This affects me in Firefox 3.6 and 4.0 (Ubuntu Linux 10.04).

Greasemonkey script:

// ==UserScript==
// @name           YouTube fix
// @namespace      http://lukemorton.com.au
// @description    Set the wmode attribute for YouTube videos
// @include        http://www.youtube.com/watch*
// ==/UserScript==

var allEmbeds, thisEmbed;
allEmbeds = document.evaluate(
    "//embed",
    document,
    null,
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
    null);

for (var i = 0; i < allEmbeds.snapshotLength; i++) 
{
    thisEmbed = allEmbeds.snapshotItem(i);
    thisEmbed.setAttribute('wmode', 'opaque')
    thisEmbed.parentNode.replaceChild(thisEmbed.cloneNode(true), thisEmbed);
}


Whilst not particularly elegant, you could probably adapt this method to work for you. If you insert the script below after the embed it should work (note that I haven't tested this):

<script type="text/javascript">
var allEmbeds, thisEmbed;
allEmbeds = document.evaluate(
    "//embed",
    document,
    null,
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
    null);

for (var i = 0; i < allEmbeds.snapshotLength; i++) 
{
    thisEmbed = allEmbeds.snapshotItem(i);
    thisEmbed.setAttribute('wmode', 'transparent')
    thisEmbed.parentNode.replaceChild(thisEmbed.cloneNode(true), thisEmbed);
}
</script>


The above code will set wmode for all embeds in the document. If you'd rather target just the movie in your code, you could use this:

<script type="text/javascript">
thisEmbed = document.getElementById('mediaPlayerMz');
thisEmbed.setAttribute('wmode', 'transparent')
thisEmbed.parentNode.replaceChild(thisEmbed.cloneNode(true), thisEmbed);
</script>


Sorry about all the links, I couldn't find a way to disable them (<nowiki> doesn't seem to work).

Copying and distribution of this software, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

Muokattu , muokkaaja luke.morton