Some preloading questions

i recently saw a web site where u click on a button, a bar comes over the content, says loading and shows a load bar and then when its done loading, slides the bar back to show new content. i started lookin around the tutorials and found this tutorial : http://www.kirupa.com/developer/mx/preloader_transition.htm , wich is exactly what i wanted… except for there is no load bar. now im not great with action scripting(or any scripting for that matter) but i tried to add my own script to it. this is what i did … i made a box on a new layer, made it a mc, and named it/gave it an instance name of loadbar(with a registration from the left side). then i went and added this script to the mc that the other swf files would be loaded into…

onClipEvent(enterFrame){
var bytes_total;
var bytes_loaded;
var getPercent;
if(bytes_total != bytes_loaded){
bytes_total = Math.round(this.getBytesTotal());
bytes_loaded = Math.round(this.getBytesLoaded());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
}
}

after messing with a whole lot i figured i would admit defeat and ask for some help. thanx guys.
[im using mx]

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=29316&highlight=loadbar

thanx. also, great tutorial, it was much appreciated.

no problem =)