How do you attach audio to an image
Using XHTML or HTML5 (whichever is easiest) I'd like to attach an audio file to an image so that when I click on the image, the audio file plays once and then stops. I would rather not have controls visible if possible.
I know how to map an image using usemap/<area>. I think I know how to do onmouse events. But I can't figure out how to associate an action to either of the two. The instruction I have uses <audio>..</audio> and that's about it.
I don't have the foggiest as to how to do this. Can anyone help?
It looks to be HTML 5. Looks like in Chrome at least if I get rid of the control attribute I can't get any CSS to display. If the attribute is there, I can at least color the controls and such.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)