First you have to place the external java script on the top of the page, do not include that in the loop when you display the results.
--------------------------------------------
<script type="text/javascript" src="swfobject.js"></script>
--------------------------------------------
Secondary if you want to display multiple players on one page you have to make each div (<div id="container">) to be unique and each java script (s1.addParam , s1.write("container")......etc...) also unique, this way each java script that start the player by parsing the parameters must have his own value (and be unique) and must be correlated with the div where the player is loading.
To implement that is very simple when you get the data from the database you should place the primary key near this parameters (<div id="container_$line['id']">) also in the java script lines (s$line['id'].addParam("flashvars","file=video.flv&image=previe w.jpg");
s$line['id'].write("container_$line['id']");) so this way you will have multiple different div's with multiple different values.
Take a look at the examples below :
--------------------------------------------------------
<div id="container_1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
var s1 = new SWFObject("player-viral.swf","ply","500","400","9","#FFFFFF");
s1.addParam("allowfullscreen","true");
s1.addParam("allownetworking","all");
s1.addParam("allowscriptaccess","always");
s1.addParam("flashvars","file=video.flv&image=prev iew.jpg");
s1.write("container_1");
</script>
-----------------------------------------------------------------------------------
<div id="container_2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
var s2 = new SWFObject("player-viral.swf","ply","500","400","9","#FFFFFF");
s2.addParam("allowfullscreen","true");
s2.addParam("allownetworking","all");
s2.addParam("allowscriptaccess","always");
s2.addParam("flashvars","file=video.flv&image=prev iew.jpg");
s2.write("container_2");
</script>
-----------------------------------------------------------------------------------------
and so on.....
Hit me up on ICQ if you need more info...
Hope to be helpful!
