PDA

View Full Version : Multiple embeds of a swf with SWF Object


hothousegraphix
11-10-2006, 02:10 AM
I have a page (XHTML) on which I'm embeding multipal instances of a single SWF (a dynamic MP3 Player). To avoid the bounding box issue with IE I've selected the SWF Object Javascript embed process. However, in IE, only the first swf populates may page; all the other embeds load the alternitive content to the <div>'s which should hold the SWF's.

All works fine in Firefox.

Wondering if anyone else has come across this and found a solution?

Advice?

Thanks!

anonymous
11-10-2006, 03:52 AM
A link to this?

hothousegraphix
11-10-2006, 02:55 PM
Sorry for the delayed response. I was not at work when I posted the thread..needed to be here to have access to the files to throw together a mock-up of this situation.

http://63.84.226.251/RoyaltyFreeMusic/swfObjectTest.html

The page describes what is occuring in IE and displays the problem.

Thanks

hothousegraphix
11-10-2006, 06:32 PM
He slaps himself in the forehead! Da!

ALL FIXED!

I wasn't updating the reference to the div ID in the JS call:

<div id="flashcontent1">
<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOW">Please upgrade your Flash Player</a>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("Player.swf", "", "140", "27", "6", "#FFFFFF");
so.addParam("FlashVars", "url=song_01.mp3");
so.write("flashcontent1");// <----HERE!!!!!
// ]]>
</script>

Thanks

anonymous
11-10-2006, 07:09 PM
No problem! :D

But good to know in any case! Thank you.

But you haven't updated your test page, right? 'Cause it still not working there.

hothousegraphix
11-10-2006, 10:11 PM
Thanks.

Test page now updated.