Pre-loader Pros

The situation is this:

Im trying to make a pre-loader that displays the load amount in text as a % and has a loading bar that will only load when the movie loads. When the movie is fully loaded the loading bar fill be full and it will display 100%, when the movie is half full it will be 50% and the bar will only be half way across.

If I wanted to make the loading bar a specific width how would I do it??

At the moment the bar only seams to want to be 100 wide.

The script im using so far is:

_width_root.loadBar=500
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent100;
_root.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}

By any chance you tried this one?
http://www.kirupa.com/developer/mx/percentagepreloader.htm
:sigh:

Yeh, thats where I got the script from, had read through the tutorial and then had a goo my self. If you go to:

www.serioussounds.net/0/SS Pre-loader01.swf

you wull see what I want as my pre-loader and how it works. I have put a white shape acting as a mask over the logo. as the movie loads the white shape gets smaller, un-covering the logo and gives the effect it is filling up with colour.

If possable I want the white shape (mask) to have fully un-covered the logo at 100%

Try making clip with a text box and a rectangle shape that you tween over 100 frames. You can frame the full rectangle shape with a hairline box in another layer that is not tweened to give the illusion that the box is filling up.

something in your pre-loader code to make it move like

percentLoaded = Math.floor(loaded/total*100);
_root.bar_mc.loaderText.text = percentLoaded;
_root.bar_mc.gotoAndStop(percentLoaded);

since the bar tweens from no length at frame 1 to full length at frame 100, the load bar will reflect how much of the movie is loaded.

That’s the rough idea anyway.

Thanks, I’ll have a go.