small audio sampler/player

I'm building a site for a client that wants a small audio sampler in their site, it will play 10 sounds in mp3 format and the user will have the capacity to download the individual sounds in .wav format, these will be stored in zip files and called using the geturl function.

The sounds need to play independently of each other, so if a user clicks on sound4 for example, any other sound will cease to play. I'm thinking of using the stopallsounds function as the first piece of script on each button that launches the streaming sound, will this create any problems?

What i'm unsure of before i beign building the player is how i should put it together for optimum usability. Would it be best to load all the textual info from an xml file and manually code the buttons or would it be possible to make it in such a way that the xml file, (or a php file?) dynamically creates the necessary play and download button for each sound in the xml. I've looked at using id3 but since the data cannot be loaded until the sound has downloaded i dont think this will work with streaming sounds.

if someone could point me in the right direction and potentially lay out the bare bones of the application it would be hugely appreciated.

Thanks.
LVL 1
robjmillsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

robjmillsAuthor Commented:
anyone??
0
seengeeCommented:
i'd just do it exactly as you said, use this script on each button to launch the sound and stop all others,

on(press)
{
      stopAllSounds();
      mp3Player = new Sound(this);
      mp3Player.loadSound("samples/yourSound.mp3", true);
      mp3Player.start();
}

and this for the zips:

on (release) {
      getURL("samples/zips/yourSound.zip");
}

and just hand code the rest, as the sounds are streaming the file will never be that big, if you want you could load this whole file into another file to keep the loading off the main timeline. you would do this by using a blank mc on the main timeline and using this;

myMc.loadMovie("audio.swf");

enjoy!.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.