# Remove child bitmap

**URL:** <https://forum.kirupa.com/t/remove-child-bitmap/299355>\
**Category:** Uncategorized\
**Created:** [November 3, 2009, 8:13pm UTC](https://forum.kirupa.com/t/remove-child-bitmap/299355 "2009-11-03T20:13:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggalan](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@ggalan](https://forum.kirupa.com/u/ggalan)\
**Post date:** [November 3, 2009, 8:13pm UTC](https://forum.kirupa.com/t/remove-child-bitmap/299355/1 "2009-11-03T20:13:55Z")

</div>

i am creating images by loading in thumbnails and creating a bitmap of each form the press of a navigation button. however i cant seem to remove child of the previous button pressed. you can see thge example here  
[http://2020proj.com/client/template1/index\_AS3.html](http://2020proj.com/client/template1/index_AS3.html)  
any help will be appreciated  
thank you

```auto

function loadImage():void 
{
    var loader:Loader = new Loader();
    var urlRequest:URLRequest = new URLRequest(imageURLs[loadedImages]);
    loader.load(urlRequest);
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
}

function imageLoaded(e:Event):void 
{
    for (var m:int = 0; m < parsedObject.item[2].issue.length; m++) 
    {
        var imageHolder:MovieClip = new MovieClip();
        imageHolder.x = m * 10; imageHolder.y = 10;
        addChild(imageHolder);
    }

    var image:Bitmap = (Bitmap)(e.target.content);
    var holder:MovieClip = someArray[loadedImages];
    holder.addChild(image);
    loadedImages++;
         
    if ( loadedImages < someArray.length ) 
    {
        loadImage();
    }
}

```
