[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

small audio sampler/player

Posted on 2003-12-03
2
Medium Priority
?
363 Views
Last Modified: 2010-04-03
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.
0
Comment
Question by:robjmills
2 Comments
 
LVL 1

Author Comment

by:robjmills
ID: 9873953
anyone??
0
 
LVL 1

Accepted Solution

by:
seengee earned 700 total points
ID: 9882062
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question