Searched forums - progress bar problems

I modified the loadBar from one of the popular preload scripts out there. What I am making is a progressbar, sorta like the ones you see in movie previews. But it doesn’t seem to o work quite right. Here’s what I have:

interface.swf - dynamically loads the movie.swf’s into itself and will control the movie (when I get around to it). it has the loadBar object

template.swf - temp name for movies first frame controls the loadBar in the interface.swf. loads 25 frames (movies are in the 2000+ range) then goes to frame 2.

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*250;
if (_framesloaded=25) {
this.gotoAndPlay (2);
} else { this.gotoAndPlay (1);}

This sorta works. See here. The problem is that the bar doesn’t go very far. Hit the refresh button, and it’s all the way at the end.

Yes, I tried _parent instead of _root. I tried putting the if-else statement before the loadBar stuff. I put the loadBar script in the interface, but that didn’t work. I did search through the forums, and so I come to you to ask for your help.

Anything?
AC

try…

_root.loadBar._xscale = getPercent*250

and instead of

if (_framesloaded=25) {
this.gotoAndPlay (2);
} else { this.gotoAndPlay (1);}

try:


if (bytes_load >= bytes_total && bytes_loaded != 0) {
    this.gotoAndPlay (2);
} else { 
    this.gotoAndPlay (1);
}

Jubba!! Always the wise!

Could you please Explain the PHP: you put in there and what the

if (bytes_load >= bytes_total && bytes_loaded != 0)

does?

AC

actually thats just actionscript but I put the wrong tag… thats just an If statment that checks to see if one variable is larger than the other, and if it does not equal 0

OK. How will this let it wait 25 frames…? I haven’t messed with these kinds of commands before.

Not working. I changed the 250 to 100, and after I refreshed it was OK, but you don’t see the progress of the load. if you leave the 250, it makes the bar WAY longer, but that doesn’t appear to be the problem of not extenting. Posted new to http://www.mdbprojects.net/interface.html

For anybody watching:
I installed a loadText to show the percentage, but it stops at 2%, which seems to be mirrored in the loadBar.

ANy ideas?http://www.mdbprojects.net/interface.html