I have a preloader that I want to actually get the true size downloaded, and what I have so far is a loading bar that is tweened smoothly to a full bar, within 25 frames. The first frame of the main mc has this:
tellTarget ("/loadbar" {
gotoAndPlay (int ( getBytesLoaded()/getBytesTotal()*100/4 ));
}
if (_level0.getBytesLoaded()/getBytesTotal()==1) {
gotoAndPlay (3);
}
I am trying to get it to get the total bytes and divide it by the current bytes downloaded and then multiply it by 100 and divide it by 4, so that I can get an integer less than 25. That way, I'll target the loading mc to go to that certain frame, getting an accurate load.
Frame 2 has this of the main clip has:
gotoAndPlay (1);
But this doesn't work. Can someone tell me what I'm doing wrong?
tellTarget ("/loadbar" {
gotoAndPlay (int ( getBytesLoaded()/getBytesTotal()*100/4 ));
}
if (_level0.getBytesLoaded()/getBytesTotal()==1) {
gotoAndPlay (3);
}
I am trying to get it to get the total bytes and divide it by the current bytes downloaded and then multiply it by 100 and divide it by 4, so that I can get an integer less than 25. That way, I'll target the loading mc to go to that certain frame, getting an accurate load.
Frame 2 has this of the main clip has:
gotoAndPlay (1);
But this doesn't work. Can someone tell me what I'm doing wrong?