# Need a little help concerning preloading external swf's

**URL:** <https://forum.kirupa.com/t/need-a-little-help-concerning-preloading-external-swfs/219444>\
**Category:** flash\
**Created:** [March 16, 2007, 2:57pm UTC](https://forum.kirupa.com/t/need-a-little-help-concerning-preloading-external-swfs/219444 "2007-03-16T14:57:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Termedea](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@Termedea](https://forum.kirupa.com/u/Termedea)\
**Post date:** [March 16, 2007, 2:57pm UTC](https://forum.kirupa.com/t/need-a-little-help-concerning-preloading-external-swfs/219444/1 "2007-03-16T14:57:39Z")

</div>

I have a problem when loading external swf files. The preloader itself works just fine, bar extends as the loading proceeds and disappears when page is loaded, and so on.  
However, as I click on one of my buttons the page starts play while it’s still loading, and I don’t want that. I want it to start at first frame only if fully loaded. How do I do that?

Ty for help.

My preloader code:

var mcLoader:MovieClipLoader = new MovieClipLoader();  
var preload:Object = new Object();  
mcLoader.addListener(preload);

preload.onLoadStart = function (targetMC) {  
extLoader\_mc.\_visible = true;  
}

preload.onLoadProgress = function(targetMC,bytesLoaded,bytesTotal) {

```
var pctLoaded = Math.round(bytesLoaded/bytesTotal*100);
extLoader_mc.loaderBar_mc._xscale = pctLoaded;
extLoader_mc.pctLoaded_txt.text = pctLoaded +" %";

```

}  
preload.onLoadComplete = function (targetMC) {  
extLoader\_mc.\_visible = false;  
}

mcLoader.loadClip(“home.swf”,loader\_mc);
