Thread: preloader
View Single Post
Old 23-01-2004, 16:16   #6 (permalink)
flatcat
Balinese Buddah Sensei
 
flatcat's Avatar
 
Join Date: Jul 2003
Location: Vancouver, British Columbia
Posts: 808
Send a message via MSN to flatcat Send a message via Skype™ to flatcat
yah, I use the same one as tomson, although I usually have some sort of bar on the screen showing the percentage, for this example we'll pretend that our loading bar on the screen is 255 pixels long... and I'm a code centralization whore so..... it would look like:

loader.onEnterFrame = function(){
loaded = getBytesLoaded();
total = getBytesTotal();
percent = (loaded/total)*100;
loader._width = (percent*2.55);
if (percent >=100){
gotoAndPlay("content");
}
}
__________________
audentes fortuna iuvat
Flatcat
  Reply With Quote