Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ I want to use a .wav file

Posted by: keytone Feb 8 2011, 06:51 PM

Hi everyone, I am trying to find out how to make a short .wav file play when an image is clicked without showing the media player. When I use <a href="mysound.wav"><img src"myimage.gif"></a>
it plays with windows media player, but the viewer has to close it. Can anyone help me with this?
Thank you very much for any guidance. John

Posted by: Austin Brove Feb 23 2011, 01:19 AM

I am also in search of this

Austin Brove
http://www.templatemagician.com

Posted by: Barons Feb 23 2011, 01:56 AM

Try this.

http://webdesign.about.com/od/sound/a/play_sound_oncl.htm

But instead of the

CODE
<a href="#" onclick="playSound('URL to soundfile');">Click here to hear a sound</a>


Yours would be


CODE
<img src"myimage.gif" onclick="playSound('mysound.wav');">




EDIT:
Not sure if this has anything to do with what your working on but

http://www.w3schools.com/html5/tag_audio.asp

You might play around with this shiny new <audio> tag and see if you can pull it off without using javascript.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)