Ho ho ho, merry christmas to you!
A three-part drop-in fix for you which should work out well enough for you (I have not tested with actual audio files yet, but should be just fine).
I added a very slight interaction method within the stream1.swf file's actionscript, for it to be able to communicate with javascript, so the javascript can control turning previous player off when another one is clicked to play.
In the stream1.swf file, I changed the actionscript for action layer frame 1 from:
playback.onRelease = function () {
play ();
};
stop ();
To the following:
import flash.external.ExternalInterface;
function sendEvent(str) {
switch(str) {
case "Play":
play();
break;
case "Stop":
pausebutton.onRelease();
break;
}
}
firstRun = true;
if (firstRun) {
firstRun = false;
id = id || ""; //if an id was passed in the flashvars one will be present, else id will be a blank string.
//makes the 'sendEvent' function available to javascript:
flash.external.ExternalInterface.addCallback("sendEvent", this, sendEvent);
}
playback.onRelease = function () {
//makes a call to a javascript function named 'stream1Start',
//if one is provided, and passes this player's id and filePath flashvars to it:
flash.external.ExternalInterface.call("stream1Start", id, filePath);
play ();
};
stop ();
So, with the above changes made to my copy of your stream1.swf file, you need to download the copy which is attached to the bottom of this post, in a .zip folder. Replace your existing one with it (after backing up the old copy - just in case, but then toss the old copy out as soon as you confirm my altered copy works right for you).
Also, need to include the following javascript function on the page:
<script type="text/javascript">
//this function will be called from within stream1.swf file when it is clicked to play,
//and it will pass the id (if one was provided in the flashvars) and filePath
//of the currently playing stream1.swf file into this function.
//This function will stop the previously playing stream1.swf file, and allow the currently clicked one to play.
//Note, we're not actually doing anything with the filePathReturnedFromFlash here, although we could have.
//However, I set it up to use an id as an id is more correctly used as an identifier. Either way, really.
function stream1Start(idReturnedFromFlash, filePathReturnedFromFlash) {
var ac = arguments.callee, //this function it's self
focusedPlayer = document.getElementById(idReturnedFromFlash); //the currently clicked (to play) player
try {
//if there is a currentlyActivePlayer property of this function
//(there won't be one the first time a player is clicked),
//and it is an object which has a sendEvent function available, this try will succeed:
ac.currentlyActivePlayer.sendEvent("Stop"); //stops the currently playing stream1.swf file
} catch(er){}
ac.currentlyActivePlayer = focusedPlayer;
}
</script>
Then, let's tidy up the ouput somewhat. Every place in the table td's where you have similar to:
<span id="preview1935"><script language="javascript">swfobject.embedSWF("/stream1.swf", "preview1935", "60", "20", "9.0.0","/js/swfobject/expressInstall.swf", {filePath : "1935"}, {wmode:"transparent"}, false);</script></span>
Change all those to just the span tags, remove the script's from all of them entirely so they become just this (with different id's in each, of course):
<span id="preview1935"></span>
Then, we'll embed the swf's in a loop instead of having all those extra scripts hanging around in the html where they don't belong. Note I added passing the object's id in the flashvars. Add the below javascript into the page, anywhere's below the link to swfobject in the head (suggest including the code within the tags below within the above script instead of having extra script tags floating around):
<script type="text/javascript">
//just a throw-away, self-invoking function to wrap the var's and keep the global space clean:
(function () {
var idPrefix = 'preview';
var idMin = 1906;
var idMax = 1935;
for (var i = idMin; i <= idMax; i++) { //>
var id = idPrefix + i;
swfobject.embedSWF("stream1.swf", id, "60", "20", "9.0.0", "/js/swfobject/expressInstall.swf", {filePath:i, id:id}, {wmode:"transparent"}, false);
}
})();
</script>
Let me know how that turns out for you, and enjoy!