You have designed a player that is intended to play multiple MP3 (or other) sound files. The player has buttons to go to the next song, the previous song, pause a song, and continue playing a song. Now, you need code. This is the recipe for that code.
Have a Flash file that has previous, next, pause, and play buttons. Name them as follows so that you can directly copy the code in this recipe:
previous: prev_btn
next: next_btn
play: play_btn
pause: pause_btn
If you do not have a file prepped, use the player.fla
file in theChapter 5 folder. Delete the dynamic text field if you are not planning on using it. Coding for the dynamic text field is not covered in the body of this recipe but in the There's more section of Displaying song information on your MP3 player.
Also, have more than one sound/music file available to you and saved in the same folder/location that you are saving the FLA
and SWF
for this recipe.
If you want to see the demo working, take...