PDA

View Full Version : Cannot load multiple swf files on one page using Swfobject


SixfootStudio
10-07-2009, 11:27 AM
Hi guys,

I am having a major issue getting swfobject to show more than one swf file on one html page. I would appreciate it if someone could please have a look and see what it is I am missing.

I have followed all the instructions on code.google.com and also used the generator.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript">
swfobject.embedSWF("base.swf", "Header", "100%", "488", "8.0.0", "expressInstall.swf");
</script>

<script type="text/javascript">
var flashvars = {};
var params = {};
params.wmode = "transparent";
params.bgcolor = "#000000";
var attributes = {};
attributes.id = "Header";
swfobject.embedSWF("map.swf", "Map", "350", "350", "8.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>

</head>
<body style="background-color:#000000">

<div id="Header">
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</div>


<div id="Map">
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</div>


</body>
</html>




Many thanks,
James

SixfootStudio
10-07-2009, 11:54 AM
I have now stripped out the FlashVars and this seems to have solved the problem of embedding multiple swf files on one page.

Problem now is that I need to use those flashVars.

Anyone have a solution I would appreciate it.

Thanks,
James