Permalink
Browse files

Refactoring start.js

  • Loading branch information...
1 parent 98cbf51 commit 766d5df62867000bbaa34db5c80fab94ac9b259b @edmore committed May 29, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 public/javascripts/start.js
@@ -4,17 +4,15 @@ soundManager.debugMode = false;
soundManager.onready(function(){
var mySounds = [];
- if( files.length > 0 ){
- for( var i=0; i < files.length; i+=1 ){
+ if( sounds.length > 0 ){
+ for( var i=0; i < sounds.length; i+=1 ){
mySounds.push( soundManager.createSound({
- id: files[i][0],
- url: "/play?filename=" + files[i][1]
+ id: sounds[i][0],
+ url: "/play?filename=" + sounds[i][1]
})
);
}
console.log(mySounds);
- mySounds[0].play();
- mySounds[1].play();
}
});

0 comments on commit 766d5df

Please sign in to comment.