Preloader bar/bits for MP3s

Hi everyone. Newbie to the board and AS and need assitance.

Is there a good tutorial on preloading MP3s with a progress bar and %? I found this thread here, but it’s WAAAY over me head: :hair:

LINK

Here’s the code I have thus far:

mySound = new Sound(mySoundMc);
mySoundVolume = 100;
mySound.setVolume(mySoundVolume);
mySound.loadSound(“music/mSound.mp3”, false);
mySound.start()

I want the sound to start on a particular frame in the movie, but have it preload in the beginning with a progress bar.

Many thanks for the help,

Parker
:hair:

This is not that complicated, simply make the frame you want to start the sound in a keyframe and put the music in that frame. Use any old preloader and it takes the sound file into consideration.

start the sound in a keyframe and put the music in that frame. Use any old preloader and it takes the sound file into consideration.

So just to clarify, I can put my code in a frame where I want to load and start the sound, and then simply put a preloader to load the whole movie? I thought I needed to specifically target a preloader to the mp3? Because the movie is 450k and the mp3 is 2.4 megabytes.

Will a universal preloader for the entire movie take the loadSound into account? I think I’m confusing myself :frowning:

Parker

:ttt:

Ok the first post said you want to load in the beginning and the second you said you want to load it at a particular frame. I am not sure what you are talking about here…sorry

Ok, I’ll clarify further…

I have a 485k movie that loads an external mp3 track file at 2.4 megs. To begin the main movie, I would like to have two preloader bars show up: 1 for the mp3 track and the other for the main movie.

I was thinking of having the mp3 start in a frame in the middle of the movie, but I’d rather have it start once the preloading bars complete, then the track kicks in.

Do I need to have a separate preloader for this mp3, OR does the main preloader for the SWF movie takes care of the mp3 load anyways. If the former, then I’d like to know how to setup this mp3 preloader.

As you can tell, I am a complete newbie in this whole mp3 business. :sigh: Thanks for your patience.

Parker

If the mp3 is included inside the swf, the size of the swf is 485k + the 2.4 meg size of the mp3 and any preloader will always run pretty much the same, I think you have to understand what a preloader does: there are two kinds. 1 that gets the bytes loaded and 1 the gets the frames loaded.
The code below has nothing to do with loading, it just manipulates a sound already loaded.

The code below has nothing to do with loading, it just manipulates a sound already loaded.

So in other words, I don’t need this preloader for the mp3 since its superfluous because I have a loadSound into my main SWF movie with a preloader?

I guess my main objective is to insure that the mp3 stream doesn’t break up on a slow connection because the entire mp3 track was not completely loaded into a browser’s cache. Therefore, I have seen these mp3 preloaders within the main SWF movie.

Do I need this mp3 preloader or not necessary? If I do, then I need a recommendation for a good tutorial, since the threads I’ve seen here on the board is beyond my expertise. Thanks,

Parker

You know we are now getting to the root of this thing… Sound is still not yet integrated into this stuff real well yet. Although I have seen some really powerful stuff from uk as long as you allow that kind of access, but…
really at the developer level I gotta believe that this kind of large mp3 data flow manipulation is for the experts.
And I am not an expert!

Hmmm, anyone else know how to make a preloader bar for an mp3? So far I’ve found another tutorial on Flashkit, but again, it’s over my head.

Book references or turtorials would be great.

Parker

I also got some problem in this situtation:
I have a animation, and a mp3 file, and I make the 1 preloader for the animation, and then I do it for 2 different way:

  1. I put the mp3 as external file, and just using actionscript “loadSound” to call the mp3; and I found in 56k moderm, the sound won’t play very well even i have preloader,…until I rewind and play the file one more time and it finally good.

  2. I import the mp3 in the flash and put it in keyframe, (as rynoe taught), once preloaded, both animation & sound is good.

So I think the command “loadSound” is not a good method to load mp3.

Ya know Terry, that brings up this clever thought {or not}. :-\

Since I want to keep my SWF movie size down to 485k and load an external MP3 at 2.4 megs, I guess I can embed the mp3 into a separate SWF movie {call it mp3.swf} and load the mp3 SWF into my main movie that way. Since I can create a preloader for an external SWF.

I’ll give that a go and post my result here. :smirk: The only issue is whether or not you can stream the SWF file with an MP3 embedded into it.

Parker

http://www.kennybellew.com/

there’s everything you need to know about the Sound (object)

Thanks Kax. I’ll run through this tutorial again. I saw this on Flashkit but not to this detail. Some reason I couldn’t get the mp3 preloader bar to work, but maybe I overlooked something here.

Better load up on coffee for this one. :wink:

Parker

well … i hope you get it this time =)