Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Multiple players on same page

3 replies [Last post]

I want to put multiple players on the same page - when I put a separate jw folder with the player (ie /jw, /jw2, /jw3...) and put the videos in the /video folder it only plays the first one I embed. I do have the correct paths to the files so I do not know what the problem is...please help!

Greg info@endlessimagery.com

 
Make sure that each player has a unique name/id and if you are using swfobject to embed your flash content, make sure that each container element has a unique id.

Without your code or a link to your Test Page, we can only guess.

I'm trying to do the same and don't succeed either - here's the testpage;:

http://www.peter-marwitz.de/in7days/referenzen-videos.html

I tried to give them unique names etc. but it still doesn't work, I only see the first player. Here's the code:

<p id="preview">SAT1</p>
<script type='text/javascript' src='player/swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('player/player.swf','player','400','300','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=fuehrerschein-mit-17-sat1.flv&image=http://www.peter-marwitz.de/in7days/player/fuehrerscheinmit17.jpg');
s1.write('preview');
</script>

<p id="preview">Intensivausbildung</p>
<script type='text/javascript' src='player1/swfobject.js'></script>
<script type='text/javascript'>
var s2 = new SWFObject('player1/player1.swf','player1','400','300','9');
s2.addParam('allowfullscreen','true');
s2.addParam('allowscriptaccess','always');
s2.addParam('flashvars','file=intensivausbildung.flv');
s2.write('preview');
</script>
<br />

Thanks!

Ah I sorted it out - I forgot to change the id (preview) to preview2 in the above code - now it works. :-)