Second part of the code:
Choose the one which fits your needs...
Code for playing a sound when pointing the mouse over some text
Code for playing a sound when pointing the mouse over a link
Code for playing a sound when pointing the mouse over an image
Code for playing a sound when pointing the mouse over an image-link
Code for playing a sound when clicking on some text
Code for playing a sound when clicking on a link
Code for playing a sound when clicking on an image
Code for playing a sound when clicking on an image-link
Paste the second part of the code into your page or post where you want the sound effect to appear.
Note: If you use the on-click method for links the link should open in a new window otherwise there's not enough time for the sound to play before the page changes (this doesn't affect on-mouseover). You may rather use on-mouseover for links which open in the same window.
Check the Basic web knowledge FAQ to know how to upload any file and get its URL. Check the Basic HTML Code knowledge base FAQ for more info on how to use the above codes.
How can I have multiple sounds playing on a page?
If you want to add multiple sounds on the same page in the first part of the code where it says
var mouseoversound1=createsoundbite("sound.ogg", "sound.mp3")
var clicksound1=createsoundbite("click_sound.ogg", "click_sound.mp3")
add more sounds like
var mouseoversound1=createsoundbite("sound.ogg", "sound.mp3")
var mouseoversound2=createsoundbite("sound2.ogg", "sound2.mp3")
var mouseoversound3=createsoundbite("sound3.ogg", "sound3.mp3")
var clicksound1=createsoundbite("click_sound.ogg", "click_sound.mp3")
var clicksound2=createsoundbite("click_sound2.ogg", "click_sound2.mp3")
var clicksound3=createsoundbite("click_sound3.ogg", "click_sound3.mp3")
and so on. In the second part of the code
change the number to reflect the right sound.
Examples...
Hover over the cow to listen what she's got to say. Or ring the bell to get to the Home page of this website (opening in a new page).