# Code not working - need advise plz!

**URL:** <https://forum.kirupa.com/t/code-not-working-need-advise-plz/252141>\
**Category:** web dev\
**Created:** [February 16, 2008, 5:54pm UTC](https://forum.kirupa.com/t/code-not-working-need-advise-plz/252141 "2008-02-16T17:54:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Megiddo2012](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@Megiddo2012](https://forum.kirupa.com/u/Megiddo2012)\
**Post date:** [February 16, 2008, 5:54pm UTC](https://forum.kirupa.com/t/code-not-working-need-advise-plz/252141/1 "2008-02-16T17:54:00Z")

</div>

Here’s the html / actionscript I’m playing with.

First, Im only running 1 swf video. I 'd like it to load it to each of the div\_id elements named placeholder. After the video completely loads to all 10 placeholders.

I would like the video to start playing all 10 at the same time. I hope the script below helps you to see what I’m trying to get the vid to do.

\*\*completely load the vid / trace the swf data / loop it to each div\_id named placeholder/ start playing all copies basicly.  
\*\*  
Thanks for the \*\*\*NEWBIE \*\*\*Help!!

\<html\>  
\<head\>  
\<title\>Multiple Simultaneous Players Example\</title\>  
\<script type=“text/javascript” src="\<A href=“[http://www.torquemasters.net/includes/sts\_templates/test/swfobject.js"\>\</script"](http://www.torquemasters.net/includes/sts_templates/test/swfobject.js%22%3E%3C/script%22)\>[http://www.torquemasters.net/includes/sts\_templates/test/swfobject.js](http://www.torquemasters.net/includes/sts_templates/test/swfobject.js)”\>\</script\>  
\<script type=“text/javascript”\>  
function createPlayer(thePlace, theFile, theImage, go) {  
var s = new SWFObject(“[http://www.torquemasters.net/torque-template/vids/pikespeak.swf",“playerID”,“40”,“20”,"7](http://www.torquemasters.net/torque-template/vids/pikespeak.swf)”);  
s.addParam(“allowfullscreen”,“true”);  
s.addVariable(“file”,theFile);  
s.addVariable(“width”,“40”);  
s.addVariable(“height”,“20”);  
s.addVariable(“displayheight”,“20”);  
s.addVariable(“overstretch”,“fit”);  
s.addVariable(“image”,theImage);  
s.addVariable(“showicons”,“true”);  
s.addVariable(“myData”,“[http://www.torquemasters.net/torque-template/vids/pikespeak.swf](http://www.torquemasters.net/torque-template/vids/pikespeak.swf)”);  
s.addVariable(‘volume’,‘20’);  
s.addVariable(“thePlace”,“[http://www.torquemasters.net/torque-template/vids/pikespeak.swf](http://www.torquemasters.net/torque-template/vids/pikespeak.swf)”);  
if (go) { s.addVariable(“autostart”,“false”); }  
s.write(thePlace);  
}  
function DIV\_id() {  
document.getElementById(‘placeholder’).innerHTML=items[current]  
if(document.all)  
placeholder.innerHTML=items[current];  
current = (current==items.length) ? 1 : current + 10;  
}  
function init() {  
createPlayer(‘placeholder1’);  
createPlayer(‘placeholder2’);  
createPlayer(‘placeholder3’);  
createPlayer(‘placeholder4’);  
createPlayer(‘placeholder5’);  
createPlayer('placeholder6);  
createPlayer(‘placeholder7’);  
createPlayer(‘placeholder8’);  
createPlayer(‘placeholder9’);  
createPlayer(‘placeholder10’);  
}

\</script\>  
\</head\>  
\<body onload=“init();”\>  
\<DIV id=“placeholder1”\>\</DIV\>  
\<DIV id=“placeholder2”\>\</DIV\>  
\<DIV id=“placeholder3”\>\</DIV\>  
\<DIV id=“placeholder4”\>\</DIV\>  
\<DIV id=“placeholder5”\>\</DIV\>  
\<DIV id=“placeholder6”\>\</DIV\>  
\<DIV id=“placeholder7”\>\</DIV\>  
\<DIV id=“placeholder8”\>\</DIV\>  
\<DIV id=“placeholder9”\>\</DIV\>  
\<DIV id=“placeholder10”\>\</DIV\>  
\</body\>  
\</html\>
