Solved

small audio sampler/player

Posted on 2003-12-03
2
356 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 175 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

809 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