# Problem loading external swf with preloader

**URL:** <https://forum.kirupa.com/t/problem-loading-external-swf-with-preloader/228835>\
**Category:** Uncategorized\
**Created:** [June 11, 2007, 9:59pm UTC](https://forum.kirupa.com/t/problem-loading-external-swf-with-preloader/228835 "2007-06-11T21:59:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kos4r](https://avatars.discourse-cdn.com/v4/letter/k/d2c977/32.png) [@kos4r](https://forum.kirupa.com/u/kos4r)\
**Post date:** [June 11, 2007, 9:59pm UTC](https://forum.kirupa.com/t/problem-loading-external-swf-with-preloader/228835/1 "2007-06-11T21:59:45Z")

</div>

i have a preloader that loads another swf. the second swf has animations but by the time the preloader is done loading the animations are already done. therefore the user does not see any of them. how do i prevent the animations from starting once the preloader starts loading the file? i included my preloader actionscript below. thanks

```auto

var requestObj:URLRequest = new URLRequest("hockernalu.swf");
var loaderObj:Loader = new Loader();
addChild(loaderObj);
loaderObj.load(requestObj);

loaderObj.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preloadProgress);

function preloadProgress(event:ProgressEvent):void {
    var loadedPercent:int = event.bytesLoaded / event.bytesTotal * 100;
    this.loadingBar_mc.loaderText_txt.text = loadedPercent + "% loaded";

}
loaderObj.visible=false;
loaderObj.contentLoaderInfo.addEventListener(Event.COMPLETE, preloadComplete);
function preloadComplete(event:Event):void {
    
    //loadingBar_mc.visible = false;
    this.loadingBar_mc.loaderText_txt.visible=false;
    this.loadingBar_mc.blocks_mov.gotoAndStop("loaded");
    if(loaderObj.visible == false)
    {
    gotoAndPlay("movement");
    }
}
    

```
