O'Reilly logo

Wordpress and Flash 10x Cookbook by Sarah Soward, Peter Spannagle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding your own stylish MP3 player

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.

Getting ready

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required