Preloader for external SWF's?

I have a project that has one Main SWF, and that loads many external SWF’s. This is working great. However, i would like to have each external Swf have it’s own preloaded on the first frame of that SWF.

I currently have a preloader that works on the first frame of my main SWF, and the code looks like this:


this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoading);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);


function onLoading(evt:ProgressEvent):void {
    var loaded:Number = evt.bytesLoaded / evt.bytesTotal; 
    percent_txt.text = (loaded*100).toFixed(0) + "%";
    var counter = (loaded*100)*3.6;
    masked_mc.mask = masking_mc;
    masked_mc.rotation = counter;
    trace(masked_mc.rotation);
    if(masked_mc.rotation < 0) {masked_mc.mask=null}
};


function onComplete(event:Event):void { 
    this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onLoading);
    this.loaderInfo.removeEventListener(Event.COMPLETE, onComplete);
    gotoAndStop(2); 
};

So I tried to duplicate this Preloader for one of my external Swf’s, but it does not work. As soon as the external SWF gets loaded the native loading dots come in rather than my custom loader.

Does anyone have any idea what I am doing wrong?