View Full Version : playing sound on mouseclick?

12-22-2010, 03:07 PM
How can I play a sound when I click an image, without the information bar popping up at top? I've looked all over, and I've tried a few javascript-only methods but none have worked for me.. Is flash the only way to go?

12-22-2010, 03:25 PM
You could put a hidden windows media player into the page and trigger it with javascript. That should play your sounds without any popup bar, but it would require users to have the necessary plugin for their browser in order to use it. It comes preloaded on Internet Explorer, but Firefox and other users will not have it unless they choose to download and install it.

The same goes for Silverlight, which is also a Microsoft product that users have to download and install a plugin in order to use. The up side for Silverlight is that it's probably more likely to exist on user's machines than the WMP plugin would be.

Anyway, flash is most likely to be supported by your users' browser but you do have other options.