# DisplayObjectContainer

**URL:** <https://forum.kirupa.com/t/displayobjectcontainer/256420>\
**Category:** flash\
**Created:** [April 2, 2008, 9:06pm UTC](https://forum.kirupa.com/t/displayobjectcontainer/256420 "2008-04-02T21:06:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gantz](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@Gantz](https://forum.kirupa.com/u/Gantz)\
**Post date:** [April 2, 2008, 9:06pm UTC](https://forum.kirupa.com/t/displayobjectcontainer/256420/1 "2008-04-02T21:06:46Z")

</div>

Hi there,  
I’ve got a question about the DisplayObjectContainer. The thing is, that I’m dooing a horizontal scroll panel, and I’m loading images from an XML file. It all works until I need to place the images in the DisplayObjectContainer.

First I make a sprite called “mainNavCont” i contains two thing, a background and another sprite which holds the thumbnails called “thumbCont”. These have to be placed on the stage from the beginning. Then when I load the Images, I want to store them in the “thumbCont”. But here’s the problem. Nothing happens.

**First**

```auto

addChild(mainNavCont);

```

**Then I load all the images and add them to the thumbLoader sprite.**

```auto

thumbLoader = new Loader();
thumbLoader.load(new URLRequest(domain + img));
thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbCompleteLoad);                        
thumbLoader.x = nextThumbX;
thumbLoader.addEventListener(MouseEvent.MOUSE_DOWN, thumbClick);    
            
thumbCont.addChild(thumbLoader);               

```

\*\*And last I add the thumbLoader to the \*\*

```auto

mainNavCont.addChild(thumbCont)             
 

```

Why doesn’t it work?
