# Problems with loader

**URL:** <https://forum.kirupa.com/t/problems-with-loader/301677>\
**Category:** Uncategorized\
**Created:** [December 13, 2009, 9:48pm UTC](https://forum.kirupa.com/t/problems-with-loader/301677 "2009-12-13T21:48:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yibman](https://avatars.discourse-cdn.com/v4/letter/y/e9a140/32.png) [@yibman](https://forum.kirupa.com/u/yibman)\
**Post date:** [December 13, 2009, 9:48pm UTC](https://forum.kirupa.com/t/problems-with-loader/301677/1 "2009-12-13T21:48:47Z")

</div>

Hi i am a beginner with actionscript and i have a problem with my external MC is suddenly trying to load into another swf when its not supposed to in the middle of another swf playing. i suspect it have something to do with the loader i am using, but i dont know.

I have 3 swf’s linking to each other (main.swf , aircombat1.swf and Myholidays.swf) through a loader. Can anybody tell me how to fix this problem ?

if you go from main to the movie Myholidays, then you will see the problem in the middle of the Myholidays movie.

you can see the movie on this url : [http://www.myholidays.dk/flash/finalproject/main.html](http://www.myholidays.dk/flash/finalproject/main.html)

my fla code is below here :

placed in frame 1 in the Myholidays movie :

close\_btn.addEventListener(MouseEvent.MOUSE\_DOWN, gotoMenu);

function gotoMenu(event):void {  
var rootObject:Object = this.parent.parent as Object;  
rootObject.returnToMain();  
}

placed in the Myholidays.swf :

stop();

import flash.net.URLRequest;  
import flash.display.Loader;  
import flash.events.Event;  
import flash.events.ProgressEvent;

function startMyholiday()  
{

```
var mRequest:URLRequest=new URLRequest("Myholidays.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.load(mRequest);

```

}

function whenCompleteHandler(loadEvent:Event) {  
//addChild(loadEvent.currentTarget.content);  
}  
function ProgressHandler(mProgress:ProgressEvent) {  
var percent:Number=mProgress.bytesLoaded/mProgress.bytesTotal;  
trace(percent);  
}  
startMyholiday();
