Click to See Complete Forum and Search --> : Best way to play a sound(sound effect)


Sup3rkirby
08-14-2007, 03:33 PM
What would the best way to play a sound be for a webpage.

I am making a game and want to add sound effects. Since it is a sound effect, it needs to be played back quickly, possibly with a simple function call?

I want to say I've seen something before where you can play back .wav sounds with a function call... anyone know anything about that?

I don't want to use <embed> or <bgsound>. This is not what I am looking for. I need to play the sound quickly, reloading the sound within tenths of a second.

Ascendancy
08-14-2007, 04:04 PM
The easiest, simplest, and most efficient way for you to accomplish this would be with Flash. I'm not sure if you have the software or anything, but that would probably be your best bet.

Sup3rkirby
08-14-2007, 04:43 PM
Ok. I do have Flash, but how exactly can I accomplish my goal with Flash?

The sound needs to be played when I call upon a JS function. I don't really want to try to find a way to rewrite my game for flash. I've already coded quite a bit. The game uses AJAX to load content and I'm not even sure flash has a similar method...