# Preloading

**URL:** https://forum.kirupa.com/t/preloading/11703
**Category:** Uncategorized
**Created:** [January 21, 2003, 6:32am UTC](https://forum.kirupa.com/t/preloading/11703 "2003-01-21T06:32:31Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Audrius](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Audrius](https://forum.kirupa.com/u/Audrius)
#### Post date: [January 21, 2003, 6:32am UTC](https://forum.kirupa.com/t/preloading/11703/1 "2003-01-21T06:32:31Z")

</div>

I have a problem with preloading external swf’s into my main movie actually I have a a seperate preloader setup for each external SWF and when i click a button to load an external movie its not showing a preloader it anoying to wait while movie loading without seeing a prelaoder. I think I discribed my problem clearly  
please help with this problem

---

<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 21, 2003, 6:40am UTC](https://forum.kirupa.com/t/preloading/11703/2 "2003-01-21T06:40:46Z")

</div>

Try changing all your \_roots to \_parent (or if you are using loadMovieNum to load in your movie it would be \_level# , where # is the # of the level you are loading to).

---

<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 21, 2003, 6:46am UTC](https://forum.kirupa.com/t/preloading/11703/3 "2003-01-21T06:46:40Z")

</div>

I have this script for my buttons:

on (release) {  
\_root.contents.loadMovie(“about.swf”);  
}

and the sam with every button

---

<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 21, 2003, 6:49am UTC](https://forum.kirupa.com/t/preloading/11703/4 "2003-01-21T06:49:04Z")

</div>

Ok, then in your preloader code change everything that says \_root to \_parent.

---

<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 21, 2003, 6:56am UTC](https://forum.kirupa.com/t/preloading/11703/5 "2003-01-21T06:56:28Z")

</div>

ok when I replaced \_root with \_parent it seems tha tit even worse but maybe it supposed to be this way so when i test the movie ( show streaming) it doesn’t show me a prealoader at all it loads without showing preloader and then plays 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: [January 21, 2003, 6:57am UTC](https://forum.kirupa.com/t/preloading/11703/6 "2003-01-21T06:57:40Z")

</div>

Well it could very well be that you don’t have enough content for it to preload so it just skips over it.

What is your preloader code?

---

<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 21, 2003, 6:59am UTC](https://forum.kirupa.com/t/preloading/11703/7 "2003-01-21T06:59:58Z")

</div>

my preloader is in a saperate scene and the code looks :

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) {  
gotoAndPlay(“website”, 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 21, 2003, 7:05am UTC](https://forum.kirupa.com/t/preloading/11703/8 "2003-01-21T07:05:18Z")

</div>

It looks correct to me. It still isn’t working?

If the only issue is that it goes right to the movie, my only guess would be that you don’t have enough content to preloader (which is a good thing… it means it loads super quick).

---

<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 21, 2003, 7:56am UTC](https://forum.kirupa.com/t/preloading/11703/9 "2003-01-21T07:56:27Z")

</div>

1. You gave your textbox the instance name of “loadtext”, when it should be the \<B\>var\</B\> name of “loadtext” (there is a difference).

2. \_root.loadBar.\_width = getPercent_100 should be \_root.loadBar.\_width = getPercent_325; since the width of your loadBar is 325.

3. All you have is a box and text in your portfolio… there is no need to preload, it loads up quick. But I think your preloader code is still fine.

Everything works great over here.
