# loadMovie quirkly problem

**URL:** <https://forum.kirupa.com/t/loadmovie-quirkly-problem/226746>\
**Category:** Uncategorized\
**Created:** [May 23, 2007, 4:29pm UTC](https://forum.kirupa.com/t/loadmovie-quirkly-problem/226746 "2007-05-23T16:29:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveyfromjersey](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@daveyfromjersey](https://forum.kirupa.com/u/daveyfromjersey)\
**Post date:** [May 23, 2007, 4:29pm UTC](https://forum.kirupa.com/t/loadmovie-quirkly-problem/226746/1 "2007-05-23T16:29:38Z")

</div>

Thanks in advance to anyone with ideas!! I’m quite confused.

Using the tutorial [here](http://www.kirupa.com/developer/mx/preloader_transition.htm) as a base, I have buttons which load different swf files into a container MC. Using the trace function I’ve narrowed down exactly where it gets “stuck” once in a while (and for no apparent reason). Most of the time it works fine! Then every 5 or so loads, it gets stuck.

Where it gets stuck is when the container MC is waiting for the new SWF to be loaded:

_Inside container:_  
onClipEvent (enterFrame) {  
if (!loaded && (this.\_url != \_root.\_url)) { //gets stuck HERE on second part  
if (this.getBytesLoaded() == this.getBytesTotal()) {  
loaded = true;  
}  
}  
}

I set up two methods to test where the problem is. First, a dynamic textbox where I pass this.\_url from inside the container (which is updated every enterFrame), and a test button which traces the container.\_url when pressed.

Sure enough, when the movie gets stuck, the button returns the container.\_url as having the new movie loaded (new path), while the dynamic text box still retains the path of the old movie.

Image here:  
[http://img337.imageshack.us/img337/1272/testgl0.jpg](http://img337.imageshack.us/img337/1272/testgl0.jpg)

Any idea why this happens? Is there a better way to test for the new movie loaded?
