[SWFObject] Embedding multiple flashlets in a page

Jim Berkey jim at jimbo.us
Fri Jul 28 05:57:53 PDT 2006


The div id must be unique for each swf, and the div id must be the same as the name in quotes on this line: so.write("unique div id")
As long as they match, put as many on a page as you like :)
jimbo

Example:
<div id="swf1"> some alternate content here</>
<script type="text/javascript">
		// <![CDATA[
		var so = new SWFObject("myFirstSwf.swf", "swf1", "750", "175", "8", "#fff", true);
		so.write("swf1");
		// ]]>
	</script>

<div id="swf2"> some alternate content here</>
<script type="text/javascript">
		// <![CDATA[
		var so = new SWFObject("anotherSwf.swf", "something", "750", "175", "8", "#fff", true);
		so.write("swf2");
		// ]]>
	</script>
<div id="swf3"> <h1>some alternate content here</h1></>
<script type="text/javascript">
		// <![CDATA[
		var so = new SWFObject("oneMoretSwf.swf", "swf3", "750", "175", "8", "#fff", true);
		so.write("swf3");
		// ]]>
	</script>



*********** REPLY SEPARATOR  ***********

On 7/28/2006 at 8:47 AM Matt S. wrote:

>Hi,
>This is probably a basic question, but whats the best way to use
>SWFObjects for the embedding of multiple swf's at different spots in a
>page? Does SWFO have multiple swf support built in or should I just
>create "var so1...var so2..." etc?
>
>thanks,
>
>.matt
>_______________________________________________
>SWFObject mailing list
>SWFObject at lists.deconcept.com
>http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com






More information about the Swfobject mailing list