I need a small sound array project in javascript.? I need an array that will preload some sound files, then I can? playSound to? each sound file using onmouseover and onmouseout to stopSound.
Here's an example:
<script type="text/javascript">
var a = [];
a[0] = "http://localhost/[login to view URL]";
a[1] = "http://localhost/[login to view URL]";
a[2] = "http://localhost/[login to view URL]";
a[3] = "http://localhost/[login to view URL]";
a[4] = "http://localhost/[login to view URL]";
a[5] = "http://localhost/[login to view URL]";
[login to view URL]("load", auPreload, false);
function playSound(soundfile) {
[login to view URL]('audioSpan').innerHTML=
"<embed src='" +soundfile+ "' hidden='true' autostart='true' loop='false' />";
for (var +i=0;i<[login to view URL];i++)
}
function stopSound() { }
</script>?
<div id="audiospan"><a href="http://localhost/[login to view URL]" onmouseover="playSound(0)" onmouseout="stopSound(0)"></div>
The above code syntax is not right but it is just something for you to see what I am talking about. I need the code to be? IE and Firefox friendly.
thanks