# \[mx04\] help debug: MovieClip.LoadMovie()

**URL:** <https://forum.kirupa.com/t/mx04-help-debug-movieclip-loadmovie/67578>\
**Category:** flash\
**Created:** [October 17, 2004, 8:15pm UTC](https://forum.kirupa.com/t/mx04-help-debug-movieclip-loadmovie/67578 "2004-10-17T20:15:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![piku](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@piku](https://forum.kirupa.com/u/piku)\
**Post date:** [October 17, 2004, 8:15pm UTC](https://forum.kirupa.com/t/mx04-help-debug-movieclip-loadmovie/67578/1 "2004-10-17T20:15:21Z")

</div>

i get problems @ this line… “contents.loadMovie(mc);”  
instead of just loading the movie, it automatically plays. and the code after it don’t even get analyzed. pointers/suggestions are greatly appreciated. TIA

> 

\_root.createEmptyMovieClip(“contents”,1);  
\_root.preloader.stop();  
\_root.preloader.\_visible = false;

// contents = an empty movieclip on the stage (instance name contents of course)  
moviesToShow\_array = [“imod\_page1.swf”, “imod\_page2.swf”, “imod\_page3.swf”, “imod\_page4.swf”, “imod\_page5.swf”, “imod\_page6.swf”];  
\_global.num = moviesToShow\_array.length;

showMovies = function (i) {

```
function loadMC(mc)
{
    **contents.loadMovie(mc);**
    this.onEnterFrame = function()
    {
		var loaded:Number = contents.getBytesLoaded();
		var total:Number = contents.getBytesTotal();
		var percent:Number = loaded/total;
		_root.preloader._visible = true;
		_root.preloader.loadBar._width = getPercent*100;
		_root.preloader.loadText = "Loading "+Math.round(getPercent*100)+"%";		   
	   
		if (percent &gt;= 1)
		{
		  // the mc is now fully loaded
		  _root.preloader.stop();
		  _root.preloader._visible = false;
		  contents.play();
		  delete this.onEnterFrame;
		}
	}
}	

loadMC(moviesToShow_array*);

if (i &lt; (_global.num - 1)) {
	this.onEnterFrame = function() {
		if ( (contents._currentframe == contents._totalframes-1) && (contents._currentframe &gt; 0) ) {
			showMovies(i+1);
		}
	};
} else {
	delete this.onEnterFrame;
}

```

};

showMovies(0);
