Hi!
I am trying to implement SWFObject 2.0 to detect Flash for two YouTube videos embedded on two of my web sites. I followed the documentation here http://code.google.com/p/swfobject/ (I used static publishing) and it works perfectly in Firefox.
However, I get a Javascript error with IE 6 and 7, which is triggered only when the Flash Player is not installed. When the player is on my machine, I see the movie and there is no error on the page.
This is the Javascript error I get with IE 6 and 7 when no Flash Player is installed:
line: 6
char: 6987
error: object required
code: 0
URL: http://www.ecounesco.ie/detectflash.aspx
I get the same exact error for both of my sites:
http://www.ecounesco.ie/detectflash.aspx
and:
http://www.natc.ie/youth/dvd08_fldetect.php
My code on this site http://www.natc.ie/youth/dvd08_fldetect.php is:
<head> section:
<script type="text/javascript" src="/scripts/swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("youthdvd", "9.0.0", "/scripts/expressInstall.swf");
</script>
section:
<div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="263" id="youthdvd" align="middle">
<param name="movie" value="http://www.youtube.com/v/sKfG_TLDxL4&hl=en&rel=0&color1=336699&color2=6699cc&border=1" />
<param name="wmode" value="opaque" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/sKfG_TLDxL4&hl=en&rel=0&color1=336699&color2=6699cc&border=1" width="300" height="263" align="middle">
<param name="wmode" value="opaque" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="../images/Youth_DVD_Get_Flash_Player.jpg" alt="Get Adobe Flash player" width="300" height="263" border="0" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
My other site has the exact similar code.
I have tested and tested and tested and cannot find why this is happening. Thanks for your help!
Web Traveller