forlfrof all you needed to do was tell me what those two objects do :P The only reason I replied was that actionscript syntax looks similar to other languages I've dealt with.
!= is not equals in normal coding conventions.
The fact that the 'int' is there specifies that there isn't a decimal point.
12.3 loaded bytes/100 total bytes = 0.123*100 = 12.3% = int(12.3) = 12
I think I figured it out...
There is definitely a problem with this part:
Code:
bar.gotoAndStop(percent_done);** //go to current percentage, innocent enough..
if (loaded_bytes == total_bytes) {****//will never get taken since the current never reaches total
****gotoAndStop(2);
} else {************************** //will always be taken
****gotoAndPlay(1);********//jump back to first frame?!?!??! This is a very disgusting way of "looping?" and doesn't work.
}
Can you even do loops in Flash since there are frames?? I dunno. Making 100 frames is a waste of time. You can scale the progress bar size you know.
Try this bit:
Code:
if(percent_done != total_percent){**************** //total_percent = 100;
********setProperty(bar,**_xscale**, percent_done)
}
else{
********goAndStop(2);
Give it a shot. You'll have to play around with it muah.
[/b]