hey I have a a nice little script for ya...
I couldnt get sounds on buttons in both IE and FX
I spent 4 hours reading and writing to make it work .. have little knowledge with coding...
it consists of a java script that I found in a forum discussion on the subject..
Put this between the <heads>
</script>
<script>
function EvalSound(soundobj) {
var thissound= document[soundobj];
thissound.Play();
}
</script>
first part is a embedded sound file, a little modified to work in firefox
=======================================================
this must be changed to the appropriate mediatype ---> type="audio/wav" for example type="application/asx" or other ....
=======================================================
------------------body part--------------------------------------------
<embed src="yuorsoundfile.wav" type="audio/wav" autostart="FALSE" loop="false"
width="0" height="0" name="sound1" enablejavascript="true">
then comes the button part :
<a href="page.html" target="" onmouseover="EvalSound('sound1')">
--------------------------------------------------------------------------
you may add or replace the onmousover with onclick or other function and it can easily be adapted to other applications
notice that the "Evalsound" sends also the id to which embedded file.. so u may have several embedded function working through the one javascript
I havent tested it with netscape or opera ... but it works like a dream in IE and FX![]()
and in a menu u just use the same code over again.. and u control the audio though the embedded code...so u dont have to rewrite the entire menu to if u change sound or somethnig...
Peace out...



Reply With Quote


Bookmarks