Page 1 of 1

Questions on putting sound on a web game

Posted: Fri Dec 03, 2010 7:31 pm
by Zyviel
I was looking at putting sound in a game that I am making but based on what I have read there seems to be differences between how to get browsers to use sound. I was wanting to have sound effects when an attack hits, misses, is blocked or parried.

Is there a css, html, or javascript commad that will play a wav file that works in most browsers? Thanks in advance for any help or advice anyone can give me about this.

Re: Questions on putting sound on a web game

Posted: Fri Dec 03, 2010 7:37 pm
by Chris
You could use JavaScript to load a media player plug-in, but your best option would be to use flash.

Re: Questions on putting sound on a web game

Posted: Fri Dec 03, 2010 11:20 pm
by Jackolantern
You could also check out GameQuery, as it has a choice between severak sound APIs that are put together just for browser-based games.