# Problem with XML Loop Placing Dynamic Points

**URL:** <https://forum.kirupa.com/t/problem-with-xml-loop-placing-dynamic-points/206732>\
**Category:** flash\
**Created:** [November 10, 2006, 7:01pm UTC](https://forum.kirupa.com/t/problem-with-xml-loop-placing-dynamic-points/206732 "2006-11-10T19:01:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bairdb](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@bairdb](https://forum.kirupa.com/u/bairdb)\
**Post date:** [November 10, 2006, 7:01pm UTC](https://forum.kirupa.com/t/problem-with-xml-loop-placing-dynamic-points/206732/1 "2006-11-10T19:01:44Z")

</div>

I am working on a map that is pulling data in from an xml file to plot the points. I have written the code below that runs a loop through and attachs a movie clip based on the xml. The problem is is that the attached movies are not showing up at all. I have run traces to see if the data is coming through correctly and it appears that it is. Can anyone see a problem with my code that would be causing this?

```auto

var xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(success){
 if(success){
  numOfLocs = this.firstChild.childNodes.length;
 
 for (i=0; i<numOfLocs; i++) {
 varName = this.firstChild.childNodes*.childNodes[3].firstChild.nodeValue;
 XLoc = this.firstChild.childNodes*.childNodes[11].firstChild.nodeValue;
 YLoc = this.firstChild.childNodes*.childNodes[12].firstChild.nodeValue;
 
 this.mapBaseMC.dotsMC.attachMovie("mappointMC", varName, i);
 
 this.mapBaseMC.dotsMC.varName._x = XLoc
 this.mapBaseMC.dotsMC.varName._y = YLoc
 }
 }else{
  trace("Error");
 }
};
xml.load("[XML FILE](http://compass/clfr/Metrics_copy(1)/new%20pages/LakeOfTheOzarks/OzarksXML.xml)");

```
