Playing multiple tracks one after another

I have an mp3 player in flash that plays, pauses, rewinds, fast forwards, adjusts volume, skips forward tracks etc. However the main problem is it will play the current track then stop. I am trying to figure out how I can make it play the next song upon the completion of the current one.

I was thinking some sort of array to store the names of the tracks, however is there some sort of action script like “on end sound” or whatever that I can use to add one to the track number thus playing songs one after the other? Any help is much appreciated.