# Can't make my playList loop

**URL:** <https://forum.kirupa.com/t/cant-make-my-playlist-loop/46024>\
**Category:** Uncategorized\
**Created:** [March 20, 2004, 8:16am UTC](https://forum.kirupa.com/t/cant-make-my-playlist-loop/46024 "2004-03-20T08:16:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tapleq](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@tapleq](https://forum.kirupa.com/u/tapleq)\
**Post date:** [March 20, 2004, 8:16am UTC](https://forum.kirupa.com/t/cant-make-my-playlist-loop/46024/1 "2004-03-20T08:16:43Z")

</div>

hi…i’m very new in flash and actionscripting and was made to create an audio player…

i have created an array of songs, consisting of 3 mp3s and wants it to be in a way tt when one song finishes, the next song plays…  
the problem is, Song number 2 plays after Song number 1 but then Song number 3 didnt play at all…  
i hope u guys can help me point out my mistake in the below actionscripts placed at frame 1 of the root timeline…

[AS]playList = [“one.mp3”, “two.mp3”, “three.mp3”];  
currentSong = 0;  
maxSongs = playList.length -1;  
function startStreaming() {  
mp3 = new Sound();  
mp3.loadSound(playList[currentSong], true);

mp3.onSoundComplete = function() {  
currentSong++;  
if(currentSong \> maxSongs) {  
currentSong = 0;}  
mp3 = new Sound();  
mp3.loadSound(playList[currentSong], true);  
};  
}

startStreaming();  
[/AS]
