loading multiple flash files on one page

64 views
Skip to first unread message

Morgan

unread,
Aug 6, 2009, 11:54:01 AM8/6/09
to SWFObject
I am working on a company intranet and have been moving flash files
that previously coded with AC_Run Active Content.js to swfobject.js (v
2.0). So far everything looks great except for one file that has
multiple flash content. No matter what I do, only the first file
shows up. I want the first file to load immediately and the others
have button to press to play (and my javascript skills are [obviously]
rudimentary.

Here's the code:

<script src="http://hpi.kp.org/docs/app/js/swfobject.js" type="text/
javascript"></script>
<script type="text/javascript">swfobject.embedSWF("http://hpi.kp.org/
docs/ca/leadership_news/wadeovergaard/_media/watchthis_08_1217/
Wade.swf", "flashcontent", "422", "350", "9.0.0", "/docs/app/js/
expressInstall.swf", {}, {base:"http://hpi.kp.org/docs/ca/
leadership_news/wadeovergaard/_media/watchthis_08_1217/"}, {});
swfobject.embedSWF("SouthBayChamps.swf", "player2", "320", "360",
"9.0.0", "/docs/app/js/expressInstall.swf", {}, {base:"."}, {});
swfobject.embedSWF("EnrollmentSpecialist.swf", "player3", "320",
"360", "9.0.0", "/docs/app/js/expressInstall.swf", {}, {base:"."},
{});
swfobject.embedSWF("ValleyService.swf", "player4", "320", "360",
"9.0.0", "/docs/app/js/expressInstall.swf", {}, {base:"."}, {});
swfobject.embedSWF("SanDiegoSA.swf", "player5", "320", "360", "9.0.0",
"/docs/app/js/expressInstall.swf", {}, {base:"."}, {});
swfobject.embedSWF("EastBaySA.swf", "player6", "320", "360", "9.0.0",
"/docs/app/js/expressInstall.swf", {}, {base:"."}, {});</script>


and then further down in the body, each of the divs look like this:
<div id="flashcontent">
<p><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"
border="0" /></a></p></div>

It works for all my pages (probably over 50) that have a single
embedded flash file, but figuring out how to do multiple flash files
is beyond me

Please help this novice.

Thanks

Claudia



Sam Sherlock

unread,
Aug 6, 2009, 2:13:14 PM8/6/09
to swfo...@googlegroups.com
do the divs have correct id? perhaps the first works since the div with id is there and the others not

do you have a link? at first glance the code looks ok.  placing multiple instances is common with swfObject
- S


2009/8/6 Morgan <morga...@gmail.com>

Morgan

unread,
Aug 10, 2009, 2:36:07 PM8/10/09
to SWFObject
(sorry for the delay -- I went camping)

Here are the two pages

http://www.claudiamorgan.us/test/watchthis_08_1217/swfobject2.html --
this is only using swfobject 2.1
http://www.claudiamorgan.us/test/watchthis_08_1217/AC_RunActiveContent.html
-- this is using AC_RunActiveContent and swfobject 1.5 -- when I tried
to change it to 2.1 it did not work.

Also http://www.claudiamorgan.us/test/watchthis_08_1217/swfobject2.html
works if I use 2.1 in the main picture and 1.5 in the little movies.

This is beyond me !

Claudia

Sam Sherlock

unread,
Aug 10, 2009, 3:05:20 PM8/10/09
to swfo...@googlegroups.com
so the first link does not work correctly since you have not updated the  following such code to the 2.x syntax (also move the updated javascript to the head) 2.x is not backward compatible with 1.x


var so = new SWFObject('embed/player.swf','mpl','320','260','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=../video/SouthBayChamps.flv&image=video/SouthBayChamps.jpg');
so.write('player2');
- S


2009/8/10 Morgan <morga...@gmail.com>

Morgan

unread,
Aug 12, 2009, 2:44:14 PM8/12/09
to SWFObject
Sam -- this is great !! I figured it had to do with syntax but since I
really know very little about js, I had no idea where to begin.

I really appreciate it -- Claudia

On Aug 10, 12:05 pm, Sam Sherlock <sam.sherl...@gmail.com> wrote:
> so the first link does not work correctly since you have not updated the
>  following such code to the 2.x syntax (also move the updated javascript to
> the head) 2.x is not backward compatible with 1.x
>
> var so = new SWFObject('embed/player.swf','mpl','320','260','9');
>
> so.addParam('allowscriptaccess','always');
> so.addParam('allowfullscreen','true');
> so.addParam('flashvars','&file=../video/SouthBayChamps.flv&image=video/SouthBayChamps.jpg');
> so.write('player2');
>
> - S
>
> 2009/8/10 Morgan <morgan94...@gmail.com>
>
>
>
> > (sorry for the delay -- I went camping)
>
> > Here are the two pages
>
> >http://www.claudiamorgan.us/test/watchthis_08_1217/swfobject2.html --
> > this is only using swfobject 2.1
> >http://www.claudiamorgan.us/test/watchthis_08_1217/AC_RunActiveConten...
> > -- this is using AC_RunActiveContent and swfobject 1.5 -- when I tried
> > to change it to 2.1 it did not work.
>
> > Alsohttp://www.claudiamorgan.us/test/watchthis_08_1217/swfobject2.html
Reply all
Reply to author
Forward
0 new messages