Building a Flash MP3 Player part 1

Flash comes with some great features for working with sound. One useful aspect allows you to dynamically load MP3 files into a Flash movie. Flash can stop and start the song as well as controlling the volume.

In this tutorial, we'll use Flash MX 2004 to build an MP3 Player. The player will show a list of MP3s and allow you to play, stop and rewind the songs. We'll also add a volume controller. Most MP3 players require you to load the mp3 files into Flash but in this tutorial, we'll store the songs in folders and use an XML file to tell Flash where everything is located.

Advertisement

This cool Dreamweaver extension lets your users enjoy a great MP3 player on your website  within a few clicks and with no Flash knowledge at all! Just select your favourite songs and a fancy skin and the extension creates a Flash MP3 Player for your website. The song title is displayed together with all the necessary controls in a cool fully stylable interface.

Get it now read more

 

 

 

In Part 2 of the tutorial, we'll build the same MP3 Player using AS2.0 classes. The second tutorial is aimed at anyone who is looking to extend their skills in the area.

This tutorial assumes that you are working with Flash MX 2004 Professional and that know how to write ActionScript. You'll learn how to work with the Sound class in Flash and load MP3s into Flash. You'll also learn how to extract values from a simple XML file and add them to UI components. We won't go into a lot of detail about XML as that's been covered in an earlier tutorial – Creating a Photo Gallery with Flash and XML - part 1.

You can download the completed files for this tutorial from the blue Properties box that contains the article PDF. There's a heading titled Code Download and you can click the Details link next to it to get the zip file. You'll need to supply your own MP3 files.

Note: If you have difficulties downloading the source files or PDF, you might have a problem with your cookies. Delete the cookies from your machine and try again. In Internet Explorer, you can do this by choosing Tools > Internet Options... and clicking the Delete Cookies... button on the General tab.

$2.89
- OR -

Sas Jacobs

Sas JacobsHello. I'm the Principal of Anything Is Possible, an Australian web development business specialising in web applications development and training. I'm interested in using Flash with dynamic content and I've presented at a number of International conferences on topics relating to applications development, XML and scripting components. I have recently released my second print book Beginning XML with DOM and Ajax to match the first one - Foundation XML for Flash. I have a business web site
and a personal web site.

See All Postings From Sas Jacobs >>