X
點擊此處開啟此網站的行動版。

技術支援討論區

FireFox shows swf twice in browser when swfobject is used to display alternate content. Is there a fix for this?

已張貼

I'm using swfobject to display alternate html content on a Flash site. In FireFox only it loads the site's swf twice. It does not happen with any other browser. You can view the site I'm testing at http://www.turntwomedia.com/index-altContent.html

This happened

Not sure how often

== I was testing the site in all browsers.

I'm using swfobject to display alternate html content on a Flash site. In FireFox only it loads the site's swf twice. It does not happen with any other browser. You can view the site I'm testing at http://www.turntwomedia.com/index-altContent.html == This happened == Not sure how often == I was testing the site in all browsers.

額外的系統細節

已安裝的外掛程式

  • -Netscape Navigator Default Plug-in
  • Runs Java applets using the latest installed versions of Java. For more information: Java Embedding Plugin. Run version test: Java Information.
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the QuickTime Web site.
  • Shockwave Flash 10.0 r42
  • LogMeIn remote Access Components
  • Coupons Inc. Plugin
  • The Flip4Mac WMV Plugin allows you to view Windows Media content using QuickTime.
  • 1.0.30715.0
  • Plugin that plays RealMedia content
  • Macromedia Shockwave for Director Netscape plug-in, version 10.1.1

應用程式

  • User Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5

更多資訊

Flash Player 10

the-edmeister
  • Top 25 Contributor
  • Moderator
5406 個解決方法 40221 個答案

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. http://forums.mozillazine.org/viewforum.php?f=25 You'll need to register and login to be able to post in that forum.

Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. [http://forums.mozillazine.org/viewforum.php?f=25] You'll need to register and login to be able to post in that forum.
cor-el
  • Top 10 Contributor
  • Moderator
17516 個解決方法 158398 個答案

You have both an EMBED and an OBJECT without a classid that is displayed by Firefox in addition the the OBJECT with a classid for IE. You need to remove one of them. Either use the EMBED or the object with the conditional code () that hides it from IE.

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="955" height="775" id="myFlashContent"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="TurnTwoMedia_web.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />

<embed src="TurnTwoMedia_web.swf" menu="false" quality="high" bgcolor="#ffffff" width="955" height="775" name="TurnTwoMedia_web" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />

<!--[if !IE]>--> <object type="application/x-shockwave-flash" data="TurnTwoMedia_web.swf" width="955" height="775">

You have both an EMBED and an OBJECT without a classid that is displayed by Firefox in addition the the OBJECT with a classid for IE. You need to remove one of them. Either use the EMBED or the object with the conditional code () that hides it from IE. <code>&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="955" height="775" id="myFlashContent"&gt; &lt;param name="allowScriptAccess" value="sameDomain" /&gt; &lt;param name="allowFullScreen" value="false" /&gt; &lt;param name="movie" value="TurnTwoMedia_web.swf" /&gt;&lt;param name="menu" value="false" /&gt;&lt;param name="quality" value="high" /&gt;&lt;param name="bgcolor" value="#ffffff" /&gt; &lt;embed src="TurnTwoMedia_web.swf" menu="false" quality="high" bgcolor="#ffffff" width="955" height="775" name="TurnTwoMedia_web" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /&gt; &lt;!--[if !IE]&gt;--&gt; &lt;object type="application/x-shockwave-flash" data="TurnTwoMedia_web.swf" width="955" height="775"&gt; </code>

提出問題者

Thanks for your response, but I had already tried that and when I remove the one for IE, which is a fix for IE, then FireFox displays both the swf and the alternate html content on the same page.

Also, when I remove the if statement for IE, it doesn't display correctly in IE.

Thanks for your response, but I had already tried that and when I remove the one for IE, which is a fix for IE, then FireFox displays both the swf and the alternate html content on the same page. Also, when I remove the if statement for IE, it doesn't display correctly in IE.
cor-el
  • Top 10 Contributor
  • Moderator
17516 個解決方法 158398 個答案

You need to remove the EMBED. You already have an object for Firefox.

You need to remove the EMBED. You already have an object for Firefox.