# Preloader problems

**URL:** <https://forum.kirupa.com/t/preloader-problems/35615>\
**Category:** Uncategorized\
**Created:** [November 16, 2003, 12:07am UTC](https://forum.kirupa.com/t/preloader-problems/35615 "2003-11-16T00:07:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![pspecial](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pspecial](https://forum.kirupa.com/u/pspecial)\
**Post date:** [November 16, 2003, 12:07am UTC](https://forum.kirupa.com/t/preloader-problems/35615/1 "2003-11-16T00:07:49Z")

</div>

Just created a preloader using one of the tuts here. Worked great in my main timeline however, upon nesting it in a movie clip… it seems to be broken.

I put the same preloader in the 1st 2 frames of my movie clip which is located in the first frame of my main timeline.

Here’s the code I’m using:

//-----------

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

//-----------

Why wont it work nested in a MC??

---

<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:** [November 16, 2003, 12:09am UTC](https://forum.kirupa.com/t/preloader-problems/35615/2 "2003-11-16T00:09:26Z")

</div>

Because **this** will now reference the movie clip, not the main timeline.

---

<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:** [November 16, 2003, 4:26am UTC](https://forum.kirupa.com/t/preloader-problems/35615/3 "2003-11-16T04:26:54Z")

</div>

Ahhh, Claudio… you’re my old partner in preload-school. Sorry to say I never really graduated.

Care to elaborate on “this”.?

What part of my code would YOU change? ANd where do you put it?? Main time line or movie clip timeline???

sPesh

---

<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:** [November 16, 2003, 4:42am UTC](https://forum.kirupa.com/t/preloader-problems/35615/4 "2003-11-16T04:42:54Z")

</div>

Hey 🙂  
Im not understanding why you have the code on the movie clip instead of pplacing it in the main timeline.  
The way you have it now, it will preload the movie clip itself, not the main movie.

---

<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:** [November 16, 2003, 5:40am UTC](https://forum.kirupa.com/t/preloader-problems/35615/5 "2003-11-16T05:40:07Z")

</div>

Well,… I put a pre-loader on the movie clip that’s embedded in the main timeline because I thought the interpreter would just read that movie clip when the playhead reaches that frame and runs that pre-loader.

If that approach is wrong, please decribe how to do it.

Thanks  
P

---

<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:** [November 16, 2003, 5:42am UTC](https://forum.kirupa.com/t/preloader-problems/35615/6 "2003-11-16T05:42:32Z")

</div>

But you want to preload the main movie right?

---

<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:** [November 16, 2003, 6:03am UTC](https://forum.kirupa.com/t/preloader-problems/35615/7 "2003-11-16T06:03:07Z")

</div>

Not really.

I wanted to load separate sections of the web site by having the playhead jump around to different keyframes on the main timeline. The keyframes contain the movie clips I want to load.

Maybe I have the preloader in the wrong place??

I dont 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:** [November 16, 2003, 6:12am UTC](https://forum.kirupa.com/t/preloader-problems/35615/8 "2003-11-16T06:12:00Z")

</div>

But if you are preloading the main movie, those “separate sections” will also be preloaded. What you can do is have these separated sections in external swf’s.

---

<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:** [November 16, 2003, 6:28am UTC](https://forum.kirupa.com/t/preloader-problems/35615/9 "2003-11-16T06:28:30Z")

</div>

Okay, I know that I can load external files with loadMovie, etc…

But thats just avoiding the issue. THE movie clip IS on the main time line already. I just want to put a preloader between the user and that movie clip.

---

<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:** [November 16, 2003, 6:31am UTC](https://forum.kirupa.com/t/preloader-problems/35615/10 "2003-11-16T06:31:06Z")

</div>

Okay i get that. But 1 question. Are you using or planning to use a preloader for the main movie?  
If you do, that will already preload that movie clip and everything else on the main timeline.  
So what you trying to do iskinda useless. :-\

---

<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:** [November 16, 2003, 7:15am UTC](https://forum.kirupa.com/t/preloader-problems/35615/11 "2003-11-16T07:15:33Z")

</div>

OK, good point But, thats also the point of my question. I DON’t want to preload the entire movie… just the individual movie clips as they are needed. This is a site for a photographer/writer so… every section is gonna have many MBs of content, I dont want to preload the entire movie… just the ‘sections’ as they are requested.

---

<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:** [November 16, 2003, 7:29am UTC](https://forum.kirupa.com/t/preloader-problems/35615/12 "2003-11-16T07:29:44Z")

</div>

Well, first of all you need to preload something. So if you dont want to preload everything, best thing is have only the essential on the main movie. Then load the rest from external swfs, as you need them.
