mp3 jukebox
window.onload = init;
function init(){
var myRoot = this;
var queue = new createjs.LoadQueue();
queue.installPlugin(createjs.Sound);
queue.addEventListener("complete", handleComplete);
queue.loadManifest([{ src: "chrismas.mp3", id: "sound1" },
{ src: "fransk3.mp3", id: "sound2" },
{ src: "orup.mp3", id: "sound3" }]);
function handleComplete(event) {
// assign each sound to unique variable
myRoot.sound1 = createjs.Sound.createInstance("sound1");
myRoot.sound2 = createjs.Sound.createInstance("sound2");
myRoot.sound3 = createjs.Sound.createInstance("sound3");
// start playing sound1
myRoot.sound1.play();
}
}
How do I play the following songs in a list as a jukebox. I want to play each song in a list that also fades into each song. Then I also want it to loop but or even stop this after three songs. How I do that.