Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash content duplicates in Opera and Chrome

Status
Not open for further replies.

phineasnferb

IS-IT--Management
Sep 17, 2009
3
0
0
GB
Hi, I could really do with some help please ... I'm desperate.

I have a webpage with a flash movie in it. Take a look at rocc.com

It is fine in Firefox and IE but in Opera and Google Chrome, the woman talking in the flash content is duplicated ... yes there are actually 2 of her.

The code I'm using to display the flash is:

<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="150" height="400">
<param name="movie" value="flash/video.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="9.0.45.0" />
<param name="expressinstall" value="scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>--></object>
<object type="application/x-shockwave-flash" data="flash/video.swf" width="150" height="400">
<![endif]<param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="swfversion" value="9.0.45.0" /><param name="expressinstall" value="scripts/expressInstall.swf" /><!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href=" src=" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>--></object>
<!--<![endif]-->
</object>



Any help would be really appreciated.
 
What is this??

Code:
<!--[if !IE]>-->

You do realise that non-IE browsers don't understand the Microsoft-only conditional comments?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Hmm.. I should clarify:

Putting a Microsoft IE-only conditional comment in your code that says "only do this if not IE" is only going to be picked up by IE - which is the opposite of what you want. All other browsers treat it as a comment, so of course will display both objects.

It's akin to the following:

Code:
<noscript>
   <script type="text/javascript">
      alert('you have no scripting enabled');
   </script>
</noscript>

Not only this, but you have only 2 open "object" tags, and 3 closing ones.

Given you appear to be loading the same Flash at the same dimensions for all browsers anyway, why bother with the redundancy of that extra markup and just go for something simple:


Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Hi Dan, thanks very much. It was that extra object tag which was causing the problem. I'll have a read of the article about simplifying the script.
Many thanks for your help mate.
 
Dan, you can use conditional comments to identify non-IE browsers, you just need to be a bit more sneaky:
Code:
<!--[if !IE]><!-->
   I am a decent browser
<!--<![endif]-->
IE will see the CC and not display the content. Other browsers will just see two normal HTML comments and ignore them, displaying the content in between.

The only problem would be that really old versions of IE don't understand CCs either, so they get treated as modern browsers! Still, this will be the least of your problems if you're still surfing with IE4.


-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
I know - you helped me out with that a while ago for similar reasons... that's why I said "non-IE browsers don't understand the Microsoft-only conditional comments" rather than "You can't use MS-only conditional comments to deliver different content to non-IE browsers".

Anyway - good on you for re-posting that advice - it's not something that springs readily to mind!

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top