Jquery: How do I fire/play a sound file when I want?

Posted by Sotkra on Stack Overflow See other posts from Stack Overflow or by Sotkra
Published on 2010-04-28T04:12:38Z Indexed on 2010/04/28 4:13 UTC
Read the original article Hit count: 230

Filed under:
|
|
|

I have some code that basically inflates a 'balloon' through 15 or so stages and then makes it pop at the 16th stage. (yes, images are changed). What I'm wondering now is if it's possible to use Jquery to play a sound file whenever I reach that 16th stage (or when whatever var reaches whatever value) - in other words...when I want.

I've found several jquery sound plugins but they all create this player which I must then click for it to play the file. How do I skip that 'click' part so that the sound is just...directly/automatically played?

http://www.sean-o.com/jquery/jmp3/

http://www.happyworm.com/jquery/jplayer/

All help is appreciated G.Campos

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about play