# Change bitmap to MovieClip

**URL:** <https://forum.kirupa.com/t/change-bitmap-to-movieclip/303842>\
**Category:** flash\
**Created:** [January 27, 2010, 11:11pm UTC](https://forum.kirupa.com/t/change-bitmap-to-movieclip/303842 "2010-01-27T23:11:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaron2004](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@aaron2004](https://forum.kirupa.com/u/aaron2004)\
**Post date:** [January 27, 2010, 11:11pm UTC](https://forum.kirupa.com/t/change-bitmap-to-movieclip/303842/1 "2010-01-27T23:11:28Z")

</div>

I’m importing bitmaps from an xml file and need each bitmap to be named as a different movie clip.

The commented area, “This is the Line”, in the below code could easily be BlankMovieClip.addChild(imageLoader). However, then all my bitmaps would be in the same container, and I need each one to have an individual name so I can modify their properties. The amount of imported bitmaps will vary, so it all has to be very flexible.

Any advice?

Thanks!

Aaron

```auto
xmlLoader.load(new URLRequest("materials.xml"));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);

function xmlLoaded(event:Event):void
{
    colors = XML(event.target.data);
    colorList = colors.children();

    for(var i:int = 0; i < colorList.length(); i++)
        {
            imageLoader = new Loader();
            imageLoader.load(new URLRequest(colorList*));
            imageLoader.blendMode=colorList*.@blend;
            imageLoader.name=colorList*.@name;
            addChild(imageLoader); //THIS IS THE LINE
        }

} 

```
