# Percentage Preloader with Loadmovie-Action

**URL:** <https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801>\
**Category:** flash\
**Created:** [January 7, 2003, 5:40pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801 "2003-01-07T17:40:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Attila\_Berlin](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Attila\_Berlin](https://forum.kirupa.com/u/Attila_Berlin)\
**Post date:** [January 7, 2003, 5:40pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/1 "2003-01-07T17:40:20Z")

</div>

HI folks,

I just finished making a preloader with the help of the tutorial here. Everything is fine except that it only works with my mainmovie. I don’t see the Preloader in my loadmovies.

Please Help.

Omitofo  
-attila-:beam:

p.s.: where I can view the streaming in flash mx?

---

<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:** [January 7, 2003, 5:48pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/2 "2003-01-07T17:48:33Z")

</div>

You will need to put the preloader on your loaded movies as well, not just your main movie.

And for show streaming, hit CTRL+Enter to preview the movie, then hit CTRL+enter \<I\>again\</I\> to view it streaming.

---

<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:** [January 7, 2003, 5:53pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/3 "2003-01-07T17:53:21Z")

</div>

CTRL+enter one more time for not streaming again 🙂

… if you want to run through the movie multiple times (restarting it over and over again in right there) CTRL+enter will do it, but doing it once from a tested movie will go to a streaming load, doing again will do a normal full load. So to test, CTRL+enter… to restart again with no stream wait, CTRL+enter CTRL+enter  
🙂

also note: View -\> show streaming

---

<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:** [January 7, 2003, 5:54pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/4 "2003-01-07T17:54:43Z")

</div>

LOL, if CTRL+Enter is said anymore times we should just call this the CTRL+Enter thread 😉

CTRL+Enter 😛

---

<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:** [January 7, 2003, 5:58pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/5 "2003-01-07T17:58:20Z")

</div>

i won’t say CTRL+Enter because i have a mac and if you do too then it would be Command+Return or Apple+return if you don’t know what button the command button is… :beam:

COMMAND+RETURN:evil:

---

<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:** [January 7, 2003, 6:01pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/6 "2003-01-07T18:01:10Z")

</div>

yeah why do they have to call it command? pfft  
I always used “open apple” or apple… even now I say apple. I mean it IS an apple. Windows has the “windows key”, why cant apple have the apple key?

…my moms still looking for the “any key”

---

<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:** [January 7, 2003, 6:01pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/7 "2003-01-07T18:01:29Z")

</div>

wow, fast reply - thanks guys.

I already knew that I had to add the preloader to my loadmovies but it didn’t worked - can’t see the preloader on my page.  
Would you be so kind to check it out for yourself - I have broadband, maybe thats where the problem is - and watch the meditation and vegetarian-section. It must be the same preloader like in my mainmovie in the beginning. Tell me please if you cannot see a preloader.

Omitofo  
Attila

p.s.: about this streaming-thing: how many bytes is broadband dsl??? I want to see how fast it is with dsl.

THXTHXTHX

---

<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:** [January 7, 2003, 6:02pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/8 "2003-01-07T18:02:12Z")

</div>

> **[Buy Domains - knowyouare.com is for sale!](https://www.buydomains.com/lander/knowyouare.com?domain=knowyouare.com&utm_source=knowyouare.com&utm_medium=click&utm_campaign=TDFS-OO-BDLander&traffic_id=TDFS-OO-BDLander&traffic_type=tdfs)**
>
> Buy a domain and see how a premium domain can be the best investment. Your business starts here. Buy a domain today.

---

<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:** [January 7, 2003, 6:02pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/9 "2003-01-07T18:02:43Z")

</div>

also note:

Debug

menu

---

<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:** [January 7, 2003, 6:07pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/10 "2003-01-07T18:07:05Z")

</div>

Maybe there isn’t enough content to load and need the preloader.

I am on cable, so it loads pretty quickly on my end. And if it loads fast enough, the preloader won’t show. And since all it is is a scrollable textbox and your text effect at the top, it might not even take any time to load.

What is the preloader code you are using?

Also… When putting a preloader in a loaded movie, the \_root is no longer the \_root (if you are loading to a movie clip), the \_root will now be called as \_parent, so you can preload the clip that you are loading to, which is what you have to do. If you are loading to a level (loadMovieNum) then you would have to target the level you are loading to, like \_level50 or something.

---

<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:** [January 7, 2003, 6:30pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/11 "2003-01-07T18:30:25Z")

</div>

now nothing works anymore.

I changed \_root to \_parent and now if the loadmovies are loaded the mainmovie goes to the first frame??? no idea

here is the code for the preloader for the loadmovies:

bytes\_loaded = Math.round(\_parent.getBytesLoaded());  
bytes\_total = Math.round(\_parent.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_parent.loadBar.\_width = getPercent_100;  
\_parent.loadText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
\_parent.gotoAndPlay(“Vegetarian”, 1);  
}

//vegetarian is the mainscene, i changed the name because i thought that this was the mistake

omitofo  
-Attila-:crazy: :crazy:

---

<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:** [January 7, 2003, 6:44pm UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/12 "2003-01-07T18:44:34Z")

</div>

Hmm, odd. Maybe I am overlooking something. Maybe try “this” instead. If that makes no sense, look below.

```auto
bytes_loaded = Math.round(_parent.getBytesLoaded());
bytes_total = Math.round(_parent.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay("Vegetarian", 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:** [January 8, 2003, 4:30am UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/13 "2003-01-08T04:30:36Z")

</div>

ok - didn’t work either.

maybe i don’t know where to add the code.  
I created my loadmovies and added in every loadmovie the preloader with the code. Is this right? or do I have to add the code to my mainmovie? I thought it is like in the mainmovie: you create some content and add a preloader - nothing very difficult - but now I have many problems.

Please check the code and HELP ME

Attila  
OMitofo:ninja:

---

<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:** [January 8, 2003, 5:13am UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/14 "2003-01-08T05:13:28Z")

</div>

Well the way a preloader works is you make your movie.

Then you put the preloader in the first frame or two (depending on the code used).

So the preloader code for your loaded movie does no go in your main movie, it goes in your loaded movie.

So both your main movie and the loaded movie will have a seperate preloader.

---

<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:** [January 8, 2003, 5:19am UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/15 "2003-01-08T05:19:41Z")

</div>

thx lostinbeta, did you receive my PM??

I did exactly everything in the kirupa-tutorial for the percentage preloader with loadbar :  
[http://www.kirupa.com/developer/mx/percentagepreloader.asp](http://www.kirupa.com/developer/mx/percentagepreloader.asp)  
but I do not have a third frame for a continue button i just have 2 frames in my first preloader-scene.

the actionscript for the first frame is:

bytes\_loaded = Math.round(\_parent.getBytesLoaded());  
bytes\_total = Math.round(\_parent.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
this.loadBar.\_width = getPercent_100;  
this.loadText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
gotoAndPlay(“Scene 5”, 1);  
}

and the actionscript for the second frame is:  
gotoAndPlay(1);

Thats it - I changed the time several times but nothing worked. I changed \_root to \_parent, gotoAndPlay to \_parent.gotoAndPlay etc. …  
Can you just give me the code of one of your preloader -maybe this will work.

THXTHXTHX  
oMITOFO  
aTTILA

;(

---

<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:** [January 8, 2003, 5:21am UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/16 "2003-01-08T05:21:18Z")

</div>

> I changed the time several times

Sorry!  
I changed the code several times.

---

<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:** [January 8, 2003, 5:26am UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/17 "2003-01-08T05:26:39Z")

</div>

First: Check the writer of that tutorial 😉

Second: Do you even see the preloader part and it just doesn’t go to the scene? Or do you not see anything at all, not even the preloading?

If your problem is just not going to the right scene, then you can assign a frame label to frame one of whatever scene you are going to, and then you the code… \_parent.gotoAndPlay(“frameName”) to go to it.

---

<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:** [January 8, 2003, 8:06am UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/18 "2003-01-08T08:06:54Z")

</div>

does the main SWF load all the associated SWF’s on initial load up, or do the associated SWF"S load when there activated???

i’m finding that my pre-loader only works with the main movie and not when i activate any associated movies. The pre loader is visible on levels 1,2,3 etc but seems doesn’t load anything.

this tells me that all associated movies are loading with the main movie which defeats the purpose of the load movie action. This might answer my question a couple of threads down regarding load up time of my main SWF.

how can can I make level 1,2,3 SWF’s load when there activated???

thanks

---

<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:** [January 8, 2003, 8:18am UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/19 "2003-01-08T08:18:18Z")

</div>

No, a preloader in your main movie does not preload your sub movies that you call on using loadMovie. You need to put a preloader in all .swf files you have.

---

<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:** [January 8, 2003, 8:34am UTC](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801/20 "2003-01-08T08:34:11Z")

</div>

thanks 4 your quick answer.

…yeh i’ve put a pre-loader in all SWF’s, but when the main SWF loads at the beginning 167KB (about 30 secs) everything works fine. When i cal about the SWF for level 1 (190KB) it comes up straight away with no load time at all.

not sure why the secong SWF doesn’t load for about 30 secs like the main SWF does considering there a similar file size??

[Next page](https://forum.kirupa.com/t/percentage-preloader-with-loadmovie-action/10801.md?page=2)
