# \[MX\] LoadMovie Preloader

**URL:** <https://forum.kirupa.com/t/mx-loadmovie-preloader/17338>\
**Category:** flash\
**Created:** [April 3, 2003, 11:36pm UTC](https://forum.kirupa.com/t/mx-loadmovie-preloader/17338 "2003-04-03T23:36:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davehead](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Davehead](https://forum.kirupa.com/u/Davehead)\
**Post date:** [April 3, 2003, 11:36pm UTC](https://forum.kirupa.com/t/mx-loadmovie-preloader/17338/1 "2003-04-03T23:36:03Z")

</div>

Hey all,  
I posted this earlier yet it seems to have gone somewhere!!!

I have a main movie which a number of other swf will load into.  
These are the actions on each of my menu buttons:

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

where “contents” is the mc being replaced in the main movie.

The actions on the “controller” clip in the preloader scene (first scene) of each smaller swf are:

onClipEvent (load) {  
tkb=\_root.getBytesTotal();  
}  
onClipEvent (enterFrame) {  
p=Math.round((\_root.getBytesLoaded()/tkb)\*100);  
\_root.percent=p;  
if (p==100) {  
\_root.gotoAndPlay(2);  
}  
}

I think the problem lies in the last line of the controller clips code.  
Where do I need to tell the movie to go once it is fully loaded.  
The pre-loader works OK when I test the movie by itself, but not when I try to load it into the main movie.  
Please help . . . . . . . . ;(

---

<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 4, 2003, 2:10pm UTC](https://forum.kirupa.com/t/mx-loadmovie-preloader/17338/2 "2003-04-04T14:10:25Z")

</div>

My guess would be to change that last line into:

[AS]this.gotoAndPlay(2);[/AS]

instead of using \_root which refers to the root of the movie once you load it into the contents mc.

---

<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 4, 2003, 2:38pm UTC](https://forum.kirupa.com/t/mx-loadmovie-preloader/17338/3 "2003-04-04T14:38:59Z")

</div>

Hey  
Thanks for the help, but I actually messed around and used “\_parent” and it works brilliantly.  
Thanks anyway 🙂

---

<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 4, 2003, 7:18pm UTC](https://forum.kirupa.com/t/mx-loadmovie-preloader/17338/4 "2003-04-04T19:18:36Z")

</div>

Cheers. 🙂
