Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <button onClick="rotatePrime(0);">Prime Slide Show</button>
  2.  
  3. var audioFile = new Array("a1.mp3","a2.mp3","a3.mp3");
  4. var audio = new Array;
  5.  
  6. for (i=0; i<audioFile.length; i++) {
  7. audio[i]= new Audio("Audio/"+audioFile[i]);
  8. audio[i].load();
  9. }
  10.  
  11. function rotatePrime() {
  12. audio[0].play();
  13. audio[0].onended=setTimeout(function(){audio[1].play();}, 2000);
  14. audio[1].onended=setTimeout(function(){audio[2].play();}, 2000);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement