On a rollover I am looking to change an image AND have a sound play. I was hoping to do this with javascript. The image is done but the sound - I have been looking into it (sound with javascript) and it seems like this is a thing of the past - and is difficult to do cross browser etc. Anyone have any info on whether this is possible, or how difficult it would be? I was hoping to do this without flash, but will use it if no other options present themselves.

Thanks for you help,

Thanks for the link, it describes how to do it for IE and netscape, but doesnt work in firefox, which is my target browser...

Is there a way to do it which is browser independent and does not open another window? I just want a momentary sound like the windows navigation sounds.

This is a bit roundabout way but should get the job done in a cross browser compatible manner.


check this out - free, open source, cross browser: http://code.google.com/p/swfsound

it can preload mp3 and you can trigger it from javascript. play/loop/stop works of course. also panning and setting volume.

hope this helps,