lorrie
10-16-2008, 03:22 PM
I'm attempting to load alternative content into a site page. I'm loading HTML content into PHP via include files. I've got the SWFObject.js file included and added into the html content pages. I'm loading all my content using the static method.
If I have only 1 SWFObject used, the alternative content shows up just fine. Once I add multiple SWFObjects into the page, it only shows my Flash content (even with Javascript disabled in Firefox 3.0.3 on Mac).
Some of my alternative content is a single image, others are multiple images (a header navigation panel).
In one page, I have:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="../js/swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("swfContent1", "8.0.0", "../swf/expressInstall.swf");
</script>
<script type="text/javascript">
swfobject.registerObject("swfContent2", "8.0.0", "../swf/expressInstall.swf");
</script>
<script type="text/javascript">
swfobject.registerObject("swfContent3", "8.0.0", "../swf/expressInstall.swf");
</script>
</head>
<body>
...Regular HTML...
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="201" height="235" id="swfContent1">
<param name="movie" value="../swf/mySwf1.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../swf/mySwf1.swf" width="201" height="235">
<!--<![endif]-->
<img src="../images/alternativeImage1.jpg" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="201" height="235" id="swfContent2">
<param name="movie" value="../swf/mySwf2.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../swf/mySwf2.swf" width="201" height="235">
<!--<![endif]-->
<img src="../images/alternativeImage2.jpg" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="201" height="235" id="swfContent3">
<param name="movie" value="../swf/mySwf3.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../swf/mySwf3.swf" width="201" height="235">
<!--<![endif]-->
<img src="../images/alternativeImage3.jpg" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</body>
</html>
I'm not sure if there's a problem with the SWFObject.js file to deal with multiple SWFObjects in the content or if it's a problem with my code. Any help would be appreciated.
If I have only 1 SWFObject used, the alternative content shows up just fine. Once I add multiple SWFObjects into the page, it only shows my Flash content (even with Javascript disabled in Firefox 3.0.3 on Mac).
Some of my alternative content is a single image, others are multiple images (a header navigation panel).
In one page, I have:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="../js/swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("swfContent1", "8.0.0", "../swf/expressInstall.swf");
</script>
<script type="text/javascript">
swfobject.registerObject("swfContent2", "8.0.0", "../swf/expressInstall.swf");
</script>
<script type="text/javascript">
swfobject.registerObject("swfContent3", "8.0.0", "../swf/expressInstall.swf");
</script>
</head>
<body>
...Regular HTML...
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="201" height="235" id="swfContent1">
<param name="movie" value="../swf/mySwf1.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../swf/mySwf1.swf" width="201" height="235">
<!--<![endif]-->
<img src="../images/alternativeImage1.jpg" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="201" height="235" id="swfContent2">
<param name="movie" value="../swf/mySwf2.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../swf/mySwf2.swf" width="201" height="235">
<!--<![endif]-->
<img src="../images/alternativeImage2.jpg" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="201" height="235" id="swfContent3">
<param name="movie" value="../swf/mySwf3.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../swf/mySwf3.swf" width="201" height="235">
<!--<![endif]-->
<img src="../images/alternativeImage3.jpg" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</body>
</html>
I'm not sure if there's a problem with the SWFObject.js file to deal with multiple SWFObjects in the content or if it's a problem with my code. Any help would be appreciated.