# Percentage preloader

**URL:** <https://forum.kirupa.com/t/percentage-preloader/7276>\
**Category:** Uncategorized\
**Created:** [October 27, 2002, 9:01am UTC](https://forum.kirupa.com/t/percentage-preloader/7276 "2002-10-27T09:01:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nipp2002](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@nipp2002](https://forum.kirupa.com/u/nipp2002)\
**Post date:** [October 27, 2002, 9:01am UTC](https://forum.kirupa.com/t/percentage-preloader/7276/1 "2002-10-27T09:01:43Z")

</div>

I used the simple Preloader from the tutorial provided here at this site.

I can use it on my main movie but when i try and use it on a movie that I load using loadMovie the preloader will not show up… am I doing something wrong? I did the same thing to the main movie that I did to this one that isn’t working… any ideas?

Thanks,  
abel

---

<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:** [October 27, 2002, 9:07am UTC](https://forum.kirupa.com/t/percentage-preloader/7276/2 "2002-10-27T09:07:37Z")

</div>

Don’t use \_root, use \_parent or nothing at all if you can.

---

<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:** [October 27, 2002, 9:10am UTC](https://forum.kirupa.com/t/percentage-preloader/7276/3 "2002-10-27T09:10:09Z")

</div>

In the preloader AS.

I have to go to bed now (3:00 am here), hopefully this fixes your problem. A couple other people had the same problem, and this worked for them.

Goodnight and Goodluck.

---

<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:** [October 27, 2002, 9:12am UTC](https://forum.kirupa.com/t/percentage-preloader/7276/4 "2002-10-27T09:12:58Z")

</div>

I am gonna add something that might be contrary to Beta’s (sorry… hehe)

But when ive loaded a movie swf into another one using a preloader, basically i had to use the \_parent to get just that one… Ive done it before…

ITs interesting im gonna see if i can make a Tutorial for this =)

---

<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:** [October 27, 2002, 8:22pm UTC](https://forum.kirupa.com/t/percentage-preloader/7276/5 "2002-10-27T20:22:37Z")

</div>

OK i just said the \*\*\*\* with that. I’ve seen so many problems and no one has seemed to figure out that external swf’s using loadMovie + preloaders. (100% anyway)

SO i went ahead and tried to just use the simplest preloader that is on a tutorial on this site.

And I pretty much give up I dont know why it wont preload even with this simple method. Any help would be MUCH appreciated! :nerd:

could not attach because it is toooo big so here is the link to the fla

[http://www.totoffroadandperformance.com/chevygal.fla](http://www.totoffroadandperformance.com/chevygal.fla)

---

<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:** [October 27, 2002, 11:24pm UTC](https://forum.kirupa.com/t/percentage-preloader/7276/6 "2002-10-27T23:24:51Z")

</div>

c’mon someone has to know ☹

---

<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:** [October 28, 2002, 2:08pm UTC](https://forum.kirupa.com/t/percentage-preloader/7276/7 "2002-10-28T14:08:39Z")

</div>

Which tute exactly? Cos your fla looks strange. I’ve never seen a preloader where you put

```auto
if (_framesloaded>=_totalframes) {
	gotoAndPlay (2);
} else {
	gotoAndPlay (1);
}

```

in the first frame… I’m not a preloader master either, but I don’t think you can do that. Try to replace that code with this:

```auto
stop();
//to stop your movie
this.onEnterFrame=function(){
   var l=this.getBytesLoaded();
   var t=this.getBytesTotal();
   if (l>1 && l>=t){
      delete this.onEnterFrame;
      this.gotoAndPlay(2);
   }
}

```

It might work (I didn’t test it).

pom 🙂

---

<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:** [October 28, 2002, 5:00pm UTC](https://forum.kirupa.com/t/percentage-preloader/7276/8 "2002-10-28T17:00:18Z")

</div>

Well the code itself works, but he has frames switched up.

There should be a keyframe in frame 1 and in frame 2. In frame one you can add these actions…

```auto
if (_framesloaded>=_totalframes) {
	gotoAndPlay (3);
} else {
	gotoAndPlay (2);
}

```

and on Frame 2 add these actions…

```auto
gotoAndPlay(1);

```

That way if it isn’t load it will play Frame 2 if the movie isn’t loaded, and Frame 2 will tell it to loop back to Frame 1, which will update its info on loading.

\<B\>Ilyas:\</B\> Whoever gets to Kirupa first, we should tell him the code is wrong in his tutorial. The code supplied by nipp2002 is right out of the tutorial (and we wonder why we have so many preloader questions here) If you want to check it out, you can find it here…  
[http://www.kirupa.com/developer/actionscript/preloader.asp](http://www.kirupa.com/developer/actionscript/preloader.asp)

BTW: Great code, not sure if it works either, but it looks like it should in theory.

---

<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:** [October 29, 2002, 2:58am UTC](https://forum.kirupa.com/t/percentage-preloader/7276/9 "2002-10-29T02:58:18Z")

</div>

Ok well I guess i just wont use a “gallery” type of setup because the scrollpane is what is not letting the preloader work for some odd reason. the preloader wiill work if i just put them inside a movieclip and place the movie clip on stage… any suggestions ?

---

<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:** [October 29, 2002, 3:07am UTC](https://forum.kirupa.com/t/percentage-preloader/7276/10 "2002-10-29T03:07:40Z")

</div>

Ermmm, no clue.

I usually put my preloader in another Scene and then having the content in the scene after that.

Works great for me :-\
