# Loader Object-AS3-DisplayObject must be a child of the caller

**URL:** <https://forum.kirupa.com/t/loader-object-as3-displayobject-must-be-a-child-of-the-caller/307684>\
**Category:** Uncategorized\
**Created:** [April 8, 2010, 9:30am UTC](https://forum.kirupa.com/t/loader-object-as3-displayobject-must-be-a-child-of-the-caller/307684 "2010-04-08T09:30:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandonW](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@brandonW](https://forum.kirupa.com/u/brandonW)\
**Post date:** [April 8, 2010, 9:30am UTC](https://forum.kirupa.com/t/loader-object-as3-displayobject-must-be-a-child-of-the-caller/307684/1 "2010-04-08T09:30:06Z")

</div>

Hello, does anyone know why I would be getting an error with my loader objects in flash. I have many loaded swf files and I get this error-everything still works fine even though I get the error.  
\*\*Error #2025: The supplied DisplayObject must be a child of the caller.at flash.display:isplayObjectContainer/removeChild()  
at Techwebpage1\_fla::MainTimeline  
\*\*  
happens over and over as I click on a new file to be loaded.

Below is a snippet of my code. I am no expert or programmer just learning  
still. Any help or advice would be greatly appreciated.  
Using AS3  
CODE BELOW  
[COLOR=Silver]  
//loader 1[/COLOR]  
var myRequest38:URLRequest = new URLRequest(“sisil\_website.swf”);  
sisilWebsite\_btn.addEventListener(MouseEvent.MOUSE\_UP, loadb38);  
function loadb38(event:MouseEvent):void {  
myloader.load(myRequest38);  
stage.addChild(myloader);  
myloader.x=300;  
myloader.y=145;  
myloader.scaleX=1;  
myloader.scaleY=1;  
}

[COLOR=Silver]//loader 2[/COLOR]  
var myRequest39:URLRequest = new URLRequest(“mbanners.swf”);  
microsoft\_btn.addEventListener(MouseEvent.MOUSE\_UP, loadM39);  
function loadM39(event:MouseEvent):void {  
myloader2.load(myRequest39);  
stage.addChild(myloader);  
myloader.x=350;  
myloader.y=145;  
myloader.scaleX=1;  
myloader.scaleY=1;  
}
