Javascript:: Is it possible to create an array of new audio objects? -


this example work :

var audio=new audio(); audio.src="hezi.mp3"; audio.play(); 

but wondering if there possibility create array of new audio objects such:

var audio[0]=new audio(); audio[0].src="hezi.mp3"; audio[0].play();  var audio[1]=new audio(); audio[1].src="gangina.mp3"; audio[1].play(); 

off-course second example not current syntax can idea...

you'd need adjust somewhat... plus don't want attempt play them @ once - , adding them dom allow give controls user.

var audio = [];  audio[0]=new audio(); audio[0].src="hezi.mp3"; audio[0].play();  audio[1]=new audio(); audio[1].src="gangina.mp3"; audio[1].play(); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -