# Remove images added with addChild

**URL:** <https://forum.kirupa.com/t/remove-images-added-with-addchild/279947>\
**Category:** Uncategorized\
**Created:** [January 20, 2009, 10:55pm UTC](https://forum.kirupa.com/t/remove-images-added-with-addchild/279947 "2009-01-20T22:55:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iammontoya](https://avatars.discourse-cdn.com/v4/letter/i/bbce88/32.png) [@Iammontoya](https://forum.kirupa.com/u/Iammontoya)\
**Post date:** [January 20, 2009, 10:55pm UTC](https://forum.kirupa.com/t/remove-images-added-with-addchild/279947/1 "2009-01-20T22:55:48Z")

</div>

removeChild is not working for me here, and I’ve tried try/catch, to no avail.

Any suggestions, please?

what happens is a timer is kicked off, the counter counts 10 secons and fires off a rotate picture function. The rotate picture function is supposed to display 7 pictures in sequence, starting with 1.jpg, then 2.jpg, etc…

All the images are loading, but I can’t get it to unload the previous image before loading the next one.

I’ve tried removeChild, unload();, try/catch, etc… this is the basic part of the code that loads the images…

```auto

var picloader:Loader = new Loader();
                        
                        addChild (picloader);
                        if(_picDisplayed < numOfImages+1){
                                
                                picloader.load( new URLRequest("put any url with pictures here"));
                                picloader.contentLoaderInfo.addEventListener(Event.COMPLETE, pictureLoaded);

```
