views:

384

answers:

1

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

A: 

Hrmm...seems like no one bothered to check here :o

The answer to my question turned out to be simple:

1.- Loading the player:

// load mp3 player with autoplay on
$(".mp3").jmp3();

2.- Modifying jsmp3.js where it reads:

"autoplay": "false" ---> change it to "true"

The rest was just hiding the player.

Oh well, congrats to...myself

Sotkra