Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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

  • 3 답장
  • 12 이 문제를 만남
  • 1 보기
  • 최종 답변자: 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.

모든 댓글 (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.

글쓴이 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.

글쓴이 luke.morton 수정일시