Put these files together:
Load the web page in a text editor, and make the following changes:
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent"></div>
<script type="text/javascript">
function loadSWF(sndName){
if(sndName){
var so = new SWFObject("audioControl.swf", "audiocontrol", "300", "150", "9", "#FF6600");
so.addParam("wmode", "transparent");
so.addVariable("myServer","rtmp://red5.llc.msu.edu/dsh");
so.addVariable("mySound","sound0001);
//so.addVariable("soundMode","playOnly");
so.write("flashcontent");
}
}
</script>
Replace the text in red with the path to your application, and the name of your sound file. You can use scripting to make the name of the sound dynamic, like this:
function loadSWF(sndName){ if(sndName){ var so = new SWFObject("audioControl.swf", "audiocontrol", "300", "150", "9", "#FF6600"); so.addParam("wmode", "transparent"); so.addVariable("myServer","rtmp://red5.llc.msu.edu/dsh"); so.addVariable("mySound",sndName); //so.addVariable("soundMode","playOnly"); so.write("flashcontent"); } }
When you call the Javascript function, you pass the sound name as a parameter, like this:
loadSWF("sound001");
If you uncomment the following line, then the file will be play-only.
//so.addVariable("soundMode","playOnly");