Multiple SWF Objects on 1 page

23 views
Skip to first unread message

lexhart

unread,
Dec 30, 2008, 9:16:37 PM12/30/08
to SWFObject
Hi Folks,

The Problem is, that I'm still an apprectice in Java and PHP ...
(cause normally i'm a graphic artist ... not a programmer)

Til now i managed it to embed my flash header with swfobject.js (in
this place ... thanks a lot to Geoff Stearns)
but although i want to embed an intro beyond it, but i can't get it
working.

Can someone of you help me in this case... and when explained, then
please in the dummy version

Thanks a lot
Greetings Lex

lexhart

unread,
Dec 30, 2008, 9:32:45 PM12/30/08
to SWFObject


the Url where it is placed meanwhile: http://preview.lexhart.at/

in this case the second is overwriting the first one ´... or it even
looks like this

Jimbo

unread,
Dec 31, 2008, 7:32:31 AM12/31/08
to swfo...@googlegroups.com
You don't say which version of swf object you are using, but if you are using 2.1, and dynamic, here is how you would do it:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>My Web Site</title>
<script src="swfobject.js" type="text/javascript"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.bgcolor = "#E6FFDD";
var attributes = {};
attributes.id = "myIntro";
swfobject.embedSWF("swf/myIntro.swf", "myIntro", "149", "250", "8.0.0", false, flashvars, params, attributes);
</script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.bgcolor = "#ffffff";
var attributes = {};
attributes.id = "header";
swfobject.embedSWF("swf/header.swf", "header", "960", "250", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
<body>
<div id="header">Content for users without flash - the header will appear here</div>
<div> More Stuff</div>
<div id="myIntro">Content for users without flash - the intro swf will appear here</div>
<div> More stuff</div>
</body>


Whatever version you are using, just be sure that each swf-div-id is unique.
hth,
jimbo
*********** REPLY SEPARATOR ***********
M

Jimbo

unread,
Dec 31, 2008, 7:42:11 AM12/31/08
to swfo...@googlegroups.com
oops, I forgot the </head> tag - fingers moving faster than brain, but you know where to put that, I'm sure.

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

lexhart

unread,
Jan 2, 2009, 12:16:35 AM1/2/09
to SWFObject
Thanks a lot...
Reply all
Reply to author
Forward
0 new messages