# idMap: How to loop through and attachMovieClip() and values?

**URL:** <https://forum.kirupa.com/t/idmap-how-to-loop-through-and-attachmovieclip-and-values/186305>\
**Category:** flash\
**Created:** [April 20, 2006, 1:34pm UTC](https://forum.kirupa.com/t/idmap-how-to-loop-through-and-attachmovieclip-and-values/186305 "2006-04-20T13:34:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bchalker](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bchalker/32/441_2.png) [@bchalker](https://forum.kirupa.com/u/bchalker)\
**Post date:** [April 20, 2006, 1:34pm UTC](https://forum.kirupa.com/t/idmap-how-to-loop-through-and-attachmovieclip-and-values/186305/1 "2006-04-20T13:34:21Z")

</div>

I’ve learned to love the functionality of idMap, but am a bit confused as to using a loop to cycle through all ID values.

Here is my XML file:  
\<objects backgroundImage=“bg1.jpg” showBorder=“0”\>  
\<object id=“Object1”\>  
\<visible\>1\</visible\>  
\<xBegin\>50\</xBegin\>  
\<xEnd\>10\</xEnd\>  
\<yBegin\>10\</yBegin\>  
\<yEnd\>10\</yEnd\>  
\<alphaBegin\>20\</alphaBegin\>  
\<alphaEnd\>50\</alphaEnd\>  
\<rotationBegin\>0\</rotationBegin\>  
\<rotationEnd\>0\</rotationEnd\>  
\<thisText\>\</thisText\>  
\<thisStatusText\>This is text that will appear on the ‘status bar’ section here.\</thisStatusText\>  
\<image\>\</image\>  
\</object\>  
\<object id=“Text1”\>  
\<visible\>1\</visible\>  
\<xBegin\>80\</xBegin\>  
\<xEnd\>10\</xEnd\>  
\<yBegin\>10\</yBegin\>  
\<yEnd\>10\</yEnd\>  
\<alphaBegin\>40\</alphaBegin\>  
\<alphaEnd\>50\</alphaEnd\>  
\<rotationBegin\>0\</rotationBegin\>  
\<rotationEnd\>0\</rotationEnd\>  
\<thisText\>\</thisText\>  
\<thisStatusText\>This is text that will appear on the ‘status bar’ section here 2.\</thisStatusText\>  
\<image\>\</image\>  
\</object\>  
…  
\</objects\>

What I am wanting to do is loop through all the ID attributes, attach and place the MC associated (named the same as the ID attribute) with it on stage.

I also am needing the childNodes looped through and assigned to the attached MC.

Can anyone give a bit of direction?

thanks…
