Skip to main content
Inspiring
January 4, 2009
Question

Play multiple songs in a row

  • January 4, 2009
  • 1 reply
  • 567 views
I am making a photo slideshow with music playing in the background. I have the first song in so it plays as soon as the slideshow starts. I want more than one song to play. I would like a new song to start as soon as the old song is complete. I tried creating another music variable underneath the first code but that didn't work. How can I add more songs so when one song ends the next one starts playing? Thanks.
This topic has been closed for replies.

1 reply

January 5, 2009
Your Sound's play-method returns a SoundChannel object. This object will dispatch a soundComplete event, when the song ends. You will just have to add an eventlistener that listens for this event. Then it's time for playing the next song. An array with all the song URLs would come in very handy.