Advertisement
Guest User

Untitled

a guest
Apr 10th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. var nameArray=new Array();
  3.     nameArray[0]="I'm gunna give you a fun problem";
  4.     nameArray[1]="I think that's a stupid number";
  5.     nameArray[2]="Jesus God";
  6.     nameArray[3]="Hold on, let me finish";
  7.     nameArray[4]="No, I have no faith in aliens";
  8.     nameArray[5]="It's also possible you could walk through the wall";
  9.     nameArray[6]="By the way, the heart is an incredible organ";
  10.     nameArray[7]="There's very little activity out here";
  11.     nameArray[8]="Wow, I wanna hit that";
  12.     nameArray[9]="Idiot";
  13.     nameArray[10]="There's no more Mexicans here, how in the hell am I gunna keep my yard?";
  14.     nameArray[11]="Political Bullshit";
  15.     nameArray[12]="This is Wacko";
  16. var baseurl = "http://dl.dropbox.com/u/109430408/bob/";
  17. function runLoop(){
  18.     var container = $('<div />');
  19.     var clips = $('<div />');
  20.     $document.ready(function(){
  21.         for (var i=0; i<nameArray.length; i++){
  22.             clips.append('<audio id="sound'+i+'" src="'+baseurl+i+'.ogg"></audio>');
  23.             container.append('<button onclick="document.getElementById("sound'+i+'").play()" value="'+nameArray[i]+'"></button>'); 
  24.         };
  25.     });
  26. };
  27. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement