# Preloader with multiple mcs wont work

**URL:** <https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763>\
**Category:** Uncategorized\
**Created:** [April 20, 2003, 7:49pm UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763 "2003-04-20T19:49:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pithcell](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@pithcell](https://forum.kirupa.com/u/pithcell)\
**Post date:** [April 20, 2003, 7:49pm UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763/1 "2003-04-20T19:49:23Z")

</div>

hey all,  
i have a main movie with an empty mc. I load an external swf1 --\> this preloads fine  
i then load external swf2 into an empty mc in external swf1 --\> this DOES NOT preload, how come??? the code is below

bytes\_loaded = Math.round(\_parent.container.knock.getBytesLoaded());  
bytes\_total = Math.round(\_parent.container.general.left.knock.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_parent.container.general.left.knock.progressBar.\_width = getPercent_200;  
\_parent.container.general.left.knock.progressText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
\_parent.container.general.left.knock.gotoAndPlay(3);  
}

---

<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:** [April 21, 2003, 3:30am UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763/2 "2003-04-21T03:30:57Z")

</div>

could u specify the names of your loaded mcs??

---

<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:** [April 21, 2003, 1:53pm UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763/3 "2003-04-21T13:53:13Z")

</div>

here are the names of the clips (by the way, just noticed that there is a mistake in the code i wrote below with these lines:  
bytes\_loaded = Math.round(\_parent.container.knock.getBytesLoaded());  
bytes\_total = Math.round(\_parent.container.general.left.knock.getBytesTotal());

ignore that, the new code is (it still doesn’t work)

bytes\_loaded = Math.round(\_parent.container.general.knock.getBytesLoaded());  
bytes\_total = Math.round(\_parent.container.general.knock.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_parent.container.general.knock.progressBar.\_width = getPercent_200;  
\_parent.container.general.knock.progressText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
\_parent.container.general.knock.gotoAndPlay(3);  
}

EMPTY MC 1 in \_root = container  
MC IN first loaded SWF = general  
EMPTY MC 2 in loaded SWF = knock  
I am loading a swf into this second empty mc (knock).

hope that helps,  
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:** [April 21, 2003, 2:07pm UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763/4 "2003-04-21T14:07:47Z")

</div>

have you tried using \_root instead of parent??? its all about targetting and maybe not specifying the second mc name in the knock mc could be the problem im not sure im not at home now, working and cant whip out a quick flash test here sorry too much work ☹ but try using \_root intead and post your results

---

<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:** [April 21, 2003, 3:42pm UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763/5 "2003-04-21T15:42:17Z")

</div>

hey grim,  
i tried \_root but its still not working. You can see what i mean at  
[http://www.solidhang.com/tonytemp/homepage.html](http://www.solidhang.com/tonytemp/homepage.html) --\> click on INSTALLATION --\> click on VIDEOS --\> click on the first big window that come up when the slider menu loads (ill turn light blue). The movie loads without the preloader,

peace  
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:** [April 21, 2003, 5:36pm UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763/6 "2003-04-21T17:36:28Z")

</div>

why dont you just make a preloader on the swf to be loaded its much simpler and less of a hassle my 2 cents

---

<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:** [April 21, 2003, 9:46pm UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763/7 "2003-04-21T21:46:35Z")

</div>

hey grim,  
that is what this is. this code goes on the swf that is to be loaded.  
anybody else got any ideas, im stuck!!!

thanks all  
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:** [April 22, 2003, 3:21am UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763/8 "2003-04-22T03:21:06Z")

</div>

well wouldnt it be easier to just make the preloader on the swf youre gonna load??

---

<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:** [April 22, 2003, 2:23pm UTC](https://forum.kirupa.com/t/preloader-with-multiple-mcs-wont-work/18763/9 "2003-04-22T14:23:48Z")

</div>

any ideas why a preloader wont show up if its going through a couple mcs and a previously loaded swf? please help!!!  
thanks
