# loadMovie() works every other time

**URL:** <https://forum.kirupa.com/t/loadmovie-works-every-other-time/71862>\
**Category:** flash\
**Created:** [November 30, 2004, 5:54am UTC](https://forum.kirupa.com/t/loadmovie-works-every-other-time/71862 "2004-11-30T05:54:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jahndi](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jahndi](https://forum.kirupa.com/u/jahndi)\
**Post date:** [November 30, 2004, 5:54am UTC](https://forum.kirupa.com/t/loadmovie-works-every-other-time/71862/1 "2004-11-30T05:54:38Z")

</div>

Ok, so I’m preloading images into a container clip on the stage. Simple enough. I have a multitude of links that each invoke this function with a different image URL. The first click works, the second won’t. The third click works, the fourth won’t. The function call and arguments all trace perfectly, but it seems like it can’t locate the image (getBytesTotal() repeatedly outputs 0). Any suggestions?

[AS]  
function image\_load (image\_url) {

```
//trace(image_url);
image_container.loadMovie(image_url);

image_preloader.onEnterFrame = function () {
	t = image_container.getBytesTotal();
	l = image_container.getBytesLoaded();
	//trace(image_container.getBytesTotal());
	this.load_bar._yscale = Math.floor((l / t) * 100);
		if((t == l) && (t &gt; 0)) {
			delete this.onEnterFrame;
		}
}

```

}  
[/AS]

I even tried resetting all of the variables in use and using an unloadMovie() before the loadMovie() to no avail. Any help is appreciated.

Regards,  
John
