Solved

small audio sampler/player

Posted on 2003-12-03
2
354 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
Comment Utility
anyone??
0
 
LVL 1

Accepted Solution

by:
seengee earned 175 total points
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
playing flash video on kiosk at startup 6 392
FLV versus SWF 11 263
Google Chrome pepflashplayer.dll 8 113
HTML 5 video and audio or Flash 1 28
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now