mp3 music list
function init() {
var myRoot = this;
var queue;
var currentSongIndex = 0;
var previousSongIndex = currentSongIndex;
var sources =
[
"fransk2.mp3",
"fransk3.mp3",
"orup.mp3"
];
queue = new createjs.LoadQueue();
queue.installPlugin(createjs.Sound);
queue.addEventListener("complete", handleComplete);
queue.loadManifest
(
[
{
src: sources[0],
id: "sound1"
},
{
src: sources[1],
id: "sound2"
},
{
src: sources[2],
id: "sound3"
}
]
);
}
function handleComplete(event)
{
myRoot.playlist = [];
myRoot.playlist[0] = createjs.Sound.createInstance("sound1");
myRoot.playlist[1] = createjs.Sound.createInstance("sound2");
myRoot.playlist[2] = createjs.Sound.createInstance("sound3");
playSong(currentSongIndex);
}
function playSong(index)
{
myRoot.playlist[index].play();
}
This code above and I want it to play but nothing happens. Now it's just quiet. How I start to play this?
