# Help Loading External .swf w/ MovieClipLoader

**URL:** https://forum.kirupa.com/t/help-loading-external-swf-w-moviecliploader/284743
**Category:** flash
**Created:** [March 23, 2009, 7:47am UTC](https://forum.kirupa.com/t/help-loading-external-swf-w-moviecliploader/284743 "2009-03-23T07:47:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mnat](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mnat](https://forum.kirupa.com/u/mnat)
#### Post date: [March 23, 2009, 7:47am UTC](https://forum.kirupa.com/t/help-loading-external-swf-w-moviecliploader/284743/1 "2009-03-23T07:47:16Z")

</div>

I’m a newbie who needs some help!

I am using the MovieClipLoader class to externally load a .swf file with a preloader. The problem is that my .swf starts playnig behind the preloader, before it is completely loaded…

How can I make it paly only after it is 100% loaded?

Here is what I have so far:

```auto
var loader:MovieClipLoader = new MovieClipLoader();
var loadHandler:Object = new Object();
  myGlobalSound = new Sound(this);
loader.addListener(loadHandler);
bar_mc._xscale = 0;
holder_mc._visible = false;
 

// what should happen when the jpg/swf is completely loaded

loadHandler.onLoadInit = function(_mc:MovieClip) {
   bar_mc._visible = false;
 text_mc._visible = false;
  _mc._visible = true;
   _mc._xscale = 100;
   _mc._yscale = 100;
   _mc.init();
myGlobalSound.setVolume(100);
};

// what should happen while the jpg/swf is loading

loadHandler.onLoadProgress = function(_mc:MovieClip, loaded:Number, total:Number) {
   bar_mc._xscale = loaded / total * 100;
	myGlobalSound.setVolume(0);
	_mc.init();
	
};

// start loading specified jpg/swf into blank movieclip holder_mc on stage
 
loader.loadClip("bubbles.swf", holder_mc);

```

Thanks!
