plusnplus Posted June 3, 2010 Share Posted June 3, 2010 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 Quote Link to comment Share on other sites More sharing options...
prestonwinfrey Posted June 3, 2010 Share Posted June 3, 2010 You could just add loop="true" to your embed tag. Quote Link to comment Share on other sites More sharing options...
prestonwinfrey Posted June 3, 2010 Share Posted June 3, 2010 I just wanted to add that you can substitute a number for a boolean in the loop attribute of the embed tag. So you would add loop="3" to the embed tag if you wanted the sound to loop through three times. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.