# MX question

**URL:** <https://forum.kirupa.com/t/mx-question/12710>\
**Category:** Uncategorized\
**Created:** [February 3, 2003, 9:47pm UTC](https://forum.kirupa.com/t/mx-question/12710 "2003-02-03T21:47:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjULTRA](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mjULTRA](https://forum.kirupa.com/u/mjULTRA)\
**Post date:** [February 3, 2003, 9:47pm UTC](https://forum.kirupa.com/t/mx-question/12710/1 "2003-02-03T21:47:41Z")

</div>

I am attempting to make an All Flash website that uses one SWF as the main page, with each subsection dynamically loaded via the loadMovie command. I would like each subsection to have a preloader for itself, but the problem i encounter is that the dynamically loaded SWF’s use \_root in the preloader, and therefore do not work when loaded into the main movie.

My question is, how can i change the code so that the preloader works for each SWF that its in, even though those are dynamically loaded?

here’s the code as taken from [Kirupa.com](http://Kirupa.com)’s Preloader with Percentage Tutorial:

```php

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.gotoAndPlay(3);
}

```

Any help would be appreciated… :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:** [February 3, 2003, 10:05pm UTC](https://forum.kirupa.com/t/mx-question/12710/2 "2003-02-03T22:05:53Z")

</div>

have you tried **[color=red]\_parent[/color]**?? :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:** [February 3, 2003, 10:08pm UTC](https://forum.kirupa.com/t/mx-question/12710/3 "2003-02-03T22:08:24Z")

</div>

actually no i have not. I tried \_self, which would make more sense, but it did not work. \_parent would get the date from the first movie, which is the same as what \_root does, and therefore does not seem to be what i need. But i will try it nonetheless…

---

<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:** [February 3, 2003, 10:18pm UTC](https://forum.kirupa.com/t/mx-question/12710/4 "2003-02-03T22:18:26Z")

</div>

what about **[color=red]\_root.yourHolderInstanceName.getBytesLoaded()[/color]**??

---

<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:** [February 3, 2003, 10:19pm UTC](https://forum.kirupa.com/t/mx-question/12710/5 "2003-02-03T22:19:51Z")

</div>

that might be more along the lines of what i need. Let me give it a go…

---

<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:** [February 3, 2003, 10:25pm UTC](https://forum.kirupa.com/t/mx-question/12710/6 "2003-02-03T22:25:34Z")

</div>

Beautiful! using \_root.WHATEVER THE NAME OF THE CLIP IS.getBytesLoaded()… works! All i have to do is change the code to point to the movie thats loaded and it works. Thanks a lot for the tip, Kax…

---

<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:** [February 3, 2003, 10:30pm UTC](https://forum.kirupa.com/t/mx-question/12710/7 "2003-02-03T22:30:56Z")

</div>

anytime man 😉

glad it worked 😏
