PDA

View Full Version : sound players


rustybones
09-30-2003, 06:08 AM
Hey guys, I'm pretty sure this is a simple question but here it goes:

What would be the best way to load and unload sound if I'm going to have a series of mp3 players in a panel (each player only containing a single track, you click on the track name and then a panel will come up with a play/stop button with track info).

Should i put each track into a seperate .swf and load them into a container or do this dynamically ?

If anyone could point in the direction of something like this or could give me a run down that would rock !!!

cheers
Rhys

Xenozip
09-30-2003, 08:41 PM
That depends.

If you do it dynamically and place all of the mp3 files in the same .swf, then the user would be forced to download all of the mp3s at once (making the .swf huge, and frcing the user to wait a long time before the whole movie loads).

If you loaded external mp3s (or .swf files) which loaded into a container inside the main movie, then the user would only have to download the songs that they clicked on.

You would still have to do some things dynamically though, so that when a user clicks on a new song, the previous (or all songs) stop instantly, to prevent the overlapping of songs reguardless of weather the user clicked the stop button or not.

I think the best way to do that would be to unload the external movieclips from the main movieclip each time the user clicks on a song. Probably using removeItemAt or removeAll or removeMovieClip (not sure which handles external files better).

I would also make sure that each external .swf file had a preloader screen as well, so that when a user clicks on a song it shows that the song is loading. You could also place the song information on the preloader screen.

Other than that, I'm not really sure what your question is... ?

rustybones
09-30-2003, 09:18 PM
That answers it pretty much, cheers for that....I'll go with loading external .swfs....each one does have a loading screen....

Now the next question is how do I unload an external .swf when the stop button is pressed...or the user presses on a different song ???

Xenozip
10-01-2003, 12:58 AM
This should work :

unloadMovie[Num](level/"target")

Example :on (press) {
unloadMovie ("_root.draggable");
loadMovieNum ("movie.swf", 4);
}

manuelarean
10-03-2003, 06:47 AM
If you load all your external movies(.swf) in the same level, the new one replace the old, so you don't have to unload each movie each time you change from one song to another..


I'm sorry about my english