Preloaders

hey all,

thanks to tanenbaumm a moderator at flashmxfiles.com, i don’t have to load a preloader onto each movie anymore with the following script…but one more question…the preloader doesn’t seem to load, rather it just appears as a graphic.

here is what i have
main movie
layer 1, frame 1-5
button with code:

on (release) {
loadMovie (“black.swf”, “contents”);
blankSize = contents.getBytesTotal();
gotoAndPlay(3);
}

layer 2, frame 1-5
empty movie clip named CONTENTS, no code

layer 3, frame 3 and 4
preloader bar named PROGRESSBAR with no code

layer 4, frame 2
with code:
gotoAndPlay(1);

frame 3
with code:

loadCheck();
function loadCheck(){
current = _root.contents.getBytesLoaded();
total = _root.contents.getBytesTotal();
percentloaded = int((current/total)*100);
progressbar._xscale = percentloaded;
if (percentloaded == 100 && total != blankSize){
gotoAndPlay(5);
}
}
frame 4
with code:

gotoAndPlay(3);

am i missing anything???
thanks again
Pravin