# Searched forums - progress bar problems

**URL:** <https://forum.kirupa.com/t/searched-forums-progress-bar-problems/17931>\
**Category:** Uncategorized\
**Created:** [April 10, 2003, 10:45pm UTC](https://forum.kirupa.com/t/searched-forums-progress-bar-problems/17931 "2003-04-10T22:45:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnonymousCaller](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@AnonymousCaller](https://forum.kirupa.com/u/AnonymousCaller)\
**Post date:** [April 10, 2003, 10:45pm UTC](https://forum.kirupa.com/t/searched-forums-progress-bar-problems/17931/1 "2003-04-10T22:45:10Z")

</div>

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.](http://www.mdbprojects.net/interface.html) 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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 10, 2003, 10:59pm UTC](https://forum.kirupa.com/t/searched-forums-progress-bar-problems/17931/2 "2003-04-10T22:59:33Z")

</div>

try…

\_root.loadBar.\_xscale = getPercent\*250

and instead of

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

try:

```php

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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 10, 2003, 11:17pm UTC](https://forum.kirupa.com/t/searched-forums-progress-bar-problems/17931/3 "2003-04-10T23:17:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 10, 2003, 11:21pm UTC](https://forum.kirupa.com/t/searched-forums-progress-bar-problems/17931/4 "2003-04-10T23:21:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 10, 2003, 11:37pm UTC](https://forum.kirupa.com/t/searched-forums-progress-bar-problems/17931/5 "2003-04-10T23:37:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 10, 2003, 11:50pm UTC](https://forum.kirupa.com/t/searched-forums-progress-bar-problems/17931/6 "2003-04-10T23:50:49Z")

</div>

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](http://www.mdbprojects.net/interface.html)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 11, 2003, 8:42pm UTC](https://forum.kirupa.com/t/searched-forums-progress-bar-problems/17931/7 "2003-04-11T20:42:21Z")

</div>

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](http://www.mdbprojects.net/interface.html)
