Jump to content

How to play sound repeatedly in javascript?


plusnplus

Recommended Posts

Hi..,

I have a loop in javascript, i want to play sound each time the loop start.

my html code  is:

<embed src="sound12.wav" autostart=false width=0 height=0 name="sound1"
enablejavascript="true" HIDDEN="TRUE">

my javascript code:

for (var i = 0; i < str_code; i++) {
        // do something
EvalSound('sound1');
  }

 

edit: the sound only play once, even the loop is 10 times

 

thanks for any reply/ help

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.