# Loading a movie which has a preloader

**URL:** <https://forum.kirupa.com/t/loading-a-movie-which-has-a-preloader/22637>\
**Category:** Uncategorized\
**Created:** [June 6, 2003, 2:06pm UTC](https://forum.kirupa.com/t/loading-a-movie-which-has-a-preloader/22637 "2003-06-06T14:06:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![easytiger](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/easytiger/32/232_2.png) [@easytiger](https://forum.kirupa.com/u/easytiger)\
**Post date:** [June 6, 2003, 2:06pm UTC](https://forum.kirupa.com/t/loading-a-movie-which-has-a-preloader/22637/1 "2003-06-06T14:06:55Z")

</div>

What it is, when i try to load a swf (which contains a preloader, which i got from this site) into another flash movie, the preloader no longer works, although it works fine when it stands alone.

Can any one help me with this one???

Thanks x

---

<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:** [June 6, 2003, 3:02pm UTC](https://forum.kirupa.com/t/loading-a-movie-which-has-a-preloader/22637/2 "2003-06-06T15:02:18Z")

</div>

that shouldn’t happen, post your project

---

<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:** [June 6, 2003, 3:33pm UTC](https://forum.kirupa.com/t/loading-a-movie-which-has-a-preloader/22637/3 "2003-06-06T15:33:11Z")

</div>

Problem of scope (there’s probably a reference to the \_root in your loaded movie). Which preloader did you use?

---

<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:** [June 6, 2003, 3:56pm UTC](https://forum.kirupa.com/t/loading-a-movie-which-has-a-preloader/22637/4 "2003-06-06T15:56:08Z")

</div>

But here’s the code, i’ve used to load the movie:

\_root.photoMovies.loadMovie(“firstFloor1.swf”);

And here’s the preloader code, used in the movie i’m loading:

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

Or is there another way i can send u the files???

Thanks alot !

---

<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:** [June 6, 2003, 4:28pm UTC](https://forum.kirupa.com/t/loading-a-movie-which-has-a-preloader/22637/5 "2003-06-06T16:28:37Z")

</div>

As Ilyas said, you have \_root in your preloader. That means it’s going to look to the main stage timeline. You have to change “\_root” to “this” (e.g. “\_root.loadBar.blahblah” to “this.loadBar.blahblah”) JUST in the preloader so it will look to the movie you are loading and not the main stage.

Hope this helps.
