Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

9: FLASH, VIDEO & AUDIO > ADDING A FLASH MP3 PLAYER

ADDING A FLASH MP3 PLAYER

image

image

There are many MP3 players that have already been written in Flash, such as:

flash-mp3-player.net
musicplayer.sourceforge.net
www.wimpyplayer.com

Each of these players has different functionality, so check their features before choosing one for your site.

This example uses a free player from flash-mp3-player.net which is embedded in the page using the SWFObject technique we met on pages 208-208. The player is told the path to the MP3 file using a parameter called mp3.

After the second <script> tag, you can see that we have created two JavaScript variables; the first called flashvars, the second called params. Even though we are not using the flashvars variable, the SWFObject script expects it before the params variable so we need it there.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint