Highlighted

mp3 music list

Explorer ,
Jan 08, 2019

Copy link to clipboard

Copied

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?

Views

164

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

mp3 music list

Explorer ,
Jan 08, 2019

Copy link to clipboard

Copied

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?

Views

165

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 08, 2019 1
Preran LATEST
Adobe Employee ,
Jan 22, 2019

Copy link to clipboard

Copied

Can you provide us with more information on what you are trying to accomplish this code?

Thanks,

Preran

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 22, 2019 0