# MovieClip.AddChild() needs your help

**URL:** https://forum.kirupa.com/t/movieclip-addchild-needs-your-help/299558
**Category:** flash
**Created:** [November 6, 2009, 6:10pm UTC](https://forum.kirupa.com/t/movieclip-addchild-needs-your-help/299558 "2009-11-06T18:10:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![BarDan](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@BarDan](https://forum.kirupa.com/u/BarDan)
#### Post date: [November 6, 2009, 6:10pm UTC](https://forum.kirupa.com/t/movieclip-addchild-needs-your-help/299558/1 "2009-11-06T18:10:04Z")

</div>

Hello everyone.

Think I need help from all the wise developers here on Kirupa. I’m trying to do something similar to JS LightBox. But I hit the wall and cant fix it.

So, basically I’m creating an empty movieClip/Sprite on stage using AS3. Give it fill, draw a rectangle in it, x, y coordinates, adding to stage, so far so perfect, it appears where it has to.  
Then, there is also another MC with ButtonMode=true. Will be the trigger.  
I’ve added listener to the buttonMC to catch the MouseDown Event. Works.

But what happens there it just doesn’t make sense.

here’s some code:

```auto

function fireLightee(e:MouseEvent):void{//from mc-button eventListener
	
	var loader = new Loader();  
	 
	loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad);  
	
	loader.load(new URLRequest("img/S6301331.jpg")); 
	
}

function onImageLoad(e:Event):void {  
    
    var loader:Loader = e.target.loader;  
    loader.x=0;
    loader.y=0;
      
    pic_mc.addChild(loader.content);  
    trace("Loading Completed");
}  

```

All I get is some nasty blue 10px wide row just next to the pic\_mc. Where does the picture hide?

It should work, Am I missing something?

My config: iMacG5, 10.5.8, Fl\_CS4.

Thanks for any help.

Barts
