HTML codes
You don't need either to allow music to be played. The best method, and most cross-browser, is just to call the sounds with a link....
<a href="soundFile1.mp3" title="Click to hear">sound file 1 </a>
This piece of code relies on Window Media Player 8,9 or 10
<object id="soundPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="0px" height="0px" type="application/x-oleobject" style="visibility:hidden"> <param name="URL" value=""> <param name="autoStart" value="true"> <param name="playCount" value="0"> <param name="volume" value="80"> <param name="rate" value="1"> <param name="uiMode" value="none"> </object>
Notice how there's no initial URL set for the player? This just embeds WMP into the page.
You can the use a function like this
function changeSound(newSound) {
document.getElementById("soundPlayer").url=newSound;} I have used this type of link on a friends site at http://intelligentaudio.net/audio , which plays sounds onmouseover with WMP or lets others hear the sound through the link.
<a href="soundFolder/soundFile1.mp3" title="Rollover or Click to Play" onmouseover="changeSound(this.href)">soundFile1.mp3</a>
Anything else you would need an external player, i like to use flash to play my music, with or without a visual player.
Good luck......
Last edited by XxNaSDaQxX; Sep 19, 2004 at 08:39 PM.
You don't need either to allow music to be played. The best method, and most cross-browser, is just to call the sounds with a link....
<a href="soundFile1.mp3" title="Click to hear">sound file 1 </a>
This piece of code relies on Window Media Player 8,9 or 10
<object id="soundPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="0px" height="0px" type="application/x-oleobject" style="visibility:hidden"> <param name="URL" value=""> <param name="autoStart" value="true"> <param name="playCount" value="0"> <param name="volume" value="80"> <param name="rate" value="1"> <param name="uiMode" value="none"> </object>
Notice how there's no initial URL set for the player? This just embeds WMP into the page.
You can the use a function like this
function changeSound(newSound) {
document.getElementById("soundPlayer").url=newSound;} I have used this type of link on a friends site at http://intelligentaudio.net/audio , which plays sounds onmouseover with WMP or lets others hear the sound through the link.
<a href="soundFolder/soundFile1.mp3" title="Rollover or Click to Play" onmouseover="changeSound(this.href)">soundFile1.mp3</a>
Anything else you would need an external player, i like to use flash to play my music, with or without a visual player.
Good luck......
Sweet Write Up 



