-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Placing the sounds in a sound array for easier management
- Loading branch information
Edmore Moyo
committed
May 26, 2012
1 parent
65021e6
commit ccacac5
Showing
1 changed file
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
soundManager.url = 'soundmanager/swf'; | ||
soundManager.url = 'soundmanager/swf/'; | ||
soundManager.debugMode = false; | ||
|
||
soundManager.onready(function(){ | ||
var mySounds = []; | ||
|
||
if( files.length > 0 ){ | ||
for( var i=0; i < files.length; i+=1 ){ | ||
var mySound = soundManager.createSound({ | ||
id: 'Sound'+ i, | ||
mySounds.push( soundManager.createSound({ | ||
id: files[i][0], | ||
url: "/play?filename=" + files[i][1] | ||
}); | ||
console.log("Currently playing...." + files[i][0]); | ||
mySound.play(); | ||
}) | ||
); | ||
} | ||
console.log(mySounds); | ||
mySounds[0].play(); | ||
mySounds[1].play(); | ||
} | ||
}); | ||
|