I want to use a .wav file |
I want to use a .wav file |
keytone |
Feb 8 2011, 06:51 PM
Post
#1
|
Group: Members Posts: 5 Joined: 19-June 10 Member No.: 12,135 |
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 |
Austin Brove |
Feb 23 2011, 01:19 AM
Post
#2
|
Group: Members Posts: 2 Joined: 10-February 11 Member No.: 13,829 |
|
Barons |
Feb 23 2011, 01:56 AM
Post
#3
|
Member Group: Members Posts: 70 Joined: 7-November 10 Member No.: 13,091 |
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. This post has been edited by Barons: Feb 23 2011, 02:20 AM |
Lo-Fi Version | Time is now: 26th April 2024 - 09:12 PM |