# % preloader doesnt work

**URL:** https://forum.kirupa.com/t/preloader-doesnt-work/185461
**Category:** flash
**Created:** [April 13, 2006, 2:43pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461 "2006-04-13T14:43:44Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![beamond](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@beamond](https://forum.kirupa.com/u/beamond)
#### Post date: [April 13, 2006, 2:43pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/1 "2006-04-13T14:43:44Z")

</div>

Can someone help me with this preloader.

Heres my code on the first frame of scene 1:

bytes\_loaded = Math.round(this.getBytesLoaded());  
bytes\_total = Math.round(this.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
this.loadBar.\_width = getPercent_100;  
this.loadText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
this.gotoAndPlay(3);  
}

and on the second frame of scene 1:

this.gotoAndPlay(3);

All the additional content is on scene 2 and has a stop action on teh first frame waiting for the user to press the play button. Heres the test page where it is uploaded: [www.kluge.biz/index3.htm](http://www.kluge.biz/index3.htm).

The problem is that instead of displaying the percentage preload bar in the first scene, the flash file shows up blank until its loaded and then goes to the 1st frame of the second scene. appears to be ignoring the preloader altogether.

Anybody help??

Thanks

---

<div class="post-metadata">

### Author: ![Mirandir](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mirandir](https://forum.kirupa.com/u/Mirandir)
#### Post date: [April 13, 2006, 3:10pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/2 "2006-04-13T15:10:12Z")

</div>

Shouldn’t the gotoAndPlay in frame 2 jump to frame 1 rather than frame 3?

/Mirandir

---

<div class="post-metadata">

### Author: ![beamond](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@beamond](https://forum.kirupa.com/u/beamond)
#### Post date: [April 13, 2006, 3:46pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/3 "2006-04-13T15:46:03Z")

</div>

thanks. this helps the % text work but the bar doesnt not fill up as the % number does. Any ideas on this?

---

<div class="post-metadata">

### Author: ![Mirandir](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mirandir](https://forum.kirupa.com/u/Mirandir)
#### Post date: [April 13, 2006, 4:02pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/4 "2006-04-13T16:02:30Z")

</div>

Use “\_xscale” rather than “\_width”.

Since \_xscale is given in % and \_width is given in points.

/Mirandir

---

<div class="post-metadata">

### Author: ![beamond](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@beamond](https://forum.kirupa.com/u/beamond)
#### Post date: [April 13, 2006, 4:22pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/5 "2006-04-13T16:22:31Z")

</div>

> [@Mirandir](#):
>
> Use “\_xscale” rather than “\_width”.
> 
> Since \_xscale is given in % and \_width is given in points.
> 
> /Mirandir

i tried that and still doesnt seem to work see [http://www.kluge.biz/index4.htm](http://www.kluge.biz/index4.htm). Do you have anything else to try?

---

<div class="post-metadata">

### Author: ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)
#### Post date: [April 13, 2006, 4:53pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/6 "2006-04-13T16:53:09Z")

</div>

maybe try this.loadBar.\_width = Number(getPercent\*100);

i dunno thats probably dumb…:look:

---

<div class="post-metadata">

### Author: ![beamond](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@beamond](https://forum.kirupa.com/u/beamond)
#### Post date: [April 13, 2006, 5:07pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/7 "2006-04-13T17:07:18Z")

</div>

> [@matthewjumps](#):
>
> maybe try this.loadBar.\_width = Number(getPercent\*100);
> 
> i dunno thats probably dumb…:look:

no still functioned the same

---

<div class="post-metadata">

### Author: ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)
#### Post date: [April 14, 2006, 5:38am UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/8 "2006-04-14T05:38:11Z")

</div>

Are you sure the bar has an instancename “loadBar” ?

scotty(-:

---

<div class="post-metadata">

### Author: ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)
#### Post date: [April 14, 2006, 7:01am UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/9 "2006-04-14T07:01:31Z")

</div>

:lol: yea i bet thats it

---

<div class="post-metadata">

### Author: ![beamond](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@beamond](https://forum.kirupa.com/u/beamond)
#### Post date: [April 17, 2006, 4:13pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/10 "2006-04-17T16:13:58Z")

</div>

> [@matthewjumps](#):
>
> :lol: yea i bet thats it

Thanks. got is fixed now at [http://www.kluge.biz/index2.htm](http://www.kluge.biz/index2.htm)

---

<div class="post-metadata">

### Author: ![beamond](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@beamond](https://forum.kirupa.com/u/beamond)
#### Post date: [April 17, 2006, 4:15pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/11 "2006-04-17T16:15:43Z")

</div>

have you seen that annoying “click to activate and use this control” message thats a part of the latest windows update for XP?? Which you hover over a flash object you have to click it first before any of the interactivity can function. Anybody overcome this issue?? I think it may be annoying for users to have to click the object before they can have access to it.

---

<div class="post-metadata">

### Author: ![rawnewdlz](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@rawnewdlz](https://forum.kirupa.com/u/rawnewdlz)
#### Post date: [April 17, 2006, 4:19pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/12 "2006-04-17T16:19:37Z")

</div>

I hate when that happens to me…simple little things that we miss 😏

---

<div class="post-metadata">

### Author: ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)
#### Post date: [April 17, 2006, 5:57pm UTC](https://forum.kirupa.com/t/preloader-doesnt-work/185461/13 "2006-04-17T17:57:56Z")

</div>

> **[New IE update messing with Flash content !](https://www.kirupa.com/forum/showthread.php?t=215974)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

scotty(-:
