PDA

View Full Version : complex preloader...


daperson
03-07-2006, 07:11 PM
hi, im trying to make an advanced pre-loader, what im trying to do is make a pre-loader that has 2 bars, one for sound, and one for the rest, how can i achieve this? i honestly havent got a clue :P

gazzer82
03-07-2006, 07:13 PM
Hi Dan

Can you explain a little more clearly what you want to do, sorry i am not quite understanding what you mean.

Cheers

Gareth

svenjoypro
03-07-2006, 07:22 PM
Are you embedding your sound, or are you loading it from an external source?

If your loading it externally, you can use:

mySound = new Sound();

mySound.loadSound("http://www.MySite.com/mySong.mp3", true);

var soundLoaded:Number = mySound.getBytesLoaded();
var soundTotal:Number = mySound.getBytesTotal();
soundDLPercent = ((soundLoaded/soundTotal) *100);

daperson
03-07-2006, 07:30 PM
at the moment they are embedded, but if it makes it easier, ill have em from an external source, what i need is 2 loading bars, well, actually 3, one displaying the progress of the sound being downloaded, one showing everything else, and one showing overall progress
and if i loaded externally, how would i make it play?

svenjoypro
03-07-2006, 07:40 PM
to make the sound start use:
mySound.start();

I don't know how, or if, you can do it if you embed the sound.

daperson
03-07-2006, 07:46 PM
ok, and where wud i put the code u gave before? main timeline?

daperson
03-08-2006, 03:15 PM
ok.. that streams the music, but the loaded percentage counter jst displays NaN