I have been at this for days and can’t get it to work. Someone HELP!
I am trying to play an audio file. It’s as simple as that, however, I do not want to reference the url of audio in the Flash action scripting. I want to be able to change the url of audio in the parameters of the flash .swf in the html coding.
Here is what I have so far…
THE HTML:
<script language=“JavaScript” type=“text/javascript”>
AC_FL_RunContent(‘codebase’, ‘http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0’,
‘width’, ‘18’,
‘height’, ‘22’,
‘src’, ‘playpause_08’,
‘quality’, ‘high’,
‘pluginspage’, ‘http://www.adobe.com/go/getflashplayer’,
‘align’, ‘middle’,
‘play’, ‘true’,
‘loop’, ‘true’,
‘scale’, ‘showall’,
‘wmode’, ‘window’,
‘devicefont’, ‘false’,
‘id’, ‘playpause_08’,
‘bgcolor’, ‘#ffffff’,
‘name’, ‘playpause_08’,
‘menu’, ‘true’,
‘allowFullScreen’, ‘false’,
‘allowScriptAccess’,‘sameDomain’,
‘movie’, ‘playpause_08’,
‘salign’, ‘’,
‘FlashVar’, ‘&sermURL=http://www.ryanrgriffin.com/audio/The%20Anti%20Christ%20of%20Revelation%2013.mp3&’
); //end AC code
</script>
<noscript>
<object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0” width=“18” height=“22” id=“playpause_08” align=“middle”>
<param name=“allowScriptAccess” value=“sameDomain” />
<param name=“allowFullScreen” value=“false” />
<param name=“movie” value=“playpause_08.swf” />
<param name=“quality” value=“high” />
<param name=“bgcolor” value="#ffffff" />
<param name=“FlashVars” value="&sermURL=http://www.ryanrgriffin.com/audio/The%20Anti%20Christ%20of%20Revelation%2013.mp3&" />
<embed src=“playpause_08.swf” FlashVars="&http://www.ryanrgriffin.com/audio/The%20Anti%20Christ%20of%20Revelation%2013.mp3&" quality=“high” bgcolor="#ffffff" width=“18” height=“22” name=“playpause_08” align=“middle” allowScriptAccess=“sameDomain” allowFullScreen=“false” type=“application/x-shockwave-flash” pluginspage=“http://www.adobe.com/go/getflashplayer” />
</object>
THE ACTION SCRIPTING:
var soundReq:URLRequest = new URLRequest(root.loaderInfo.parameters.sermURL);
var sound:Sound = new Sound();
sound.load(soundReq);
sound.addEventListener(Event.COMPLETE, onComplete);
function onComplete(event:Event):void
{
newRoot.gotoAndPlay(“loaded”);
}
Can someone help me make this work?
The audio file is found at http://www.ryanrgriffin.com/audio/The%20Anti%20Christ%20of%20Revelation%2013.mp3.