# URGENT - MC Placement Issue

**URL:** <https://forum.kirupa.com/t/urgent-mc-placement-issue/199110>\
**Category:** flash\
**Created:** [August 31, 2006, 5:04am UTC](https://forum.kirupa.com/t/urgent-mc-placement-issue/199110 "2006-08-31T05:04:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![codemonkeypete](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@codemonkeypete](https://forum.kirupa.com/u/codemonkeypete)\
**Post date:** [August 31, 2006, 5:04am UTC](https://forum.kirupa.com/t/urgent-mc-placement-issue/199110/1 "2006-08-31T05:04:58Z")

</div>

I have the following code loading in images from an xml file, and i urgently need to work out the placement and location of each attached clip:

[AS]  
projectimagesxml.onLoad = function(){  
items = this.firstChild.childNodes;  
for(a = 0; a\<= items.length-1; a++){  
\_parent.projectimages.imagemenu.attachMovie( “imageBtn”, “item”+a, a);  
\_parent.projectimages.attachMovie( “image”, “item”+a, a);  
\_parent.projectimages[“item”+a].itemId = items[a].childNodes[0].firstChild.nodeValue;  
\_parent.projectimages[“item”+a].loadMovie(“[http://mywebsite.com/images/gallery\_photos/](http://mywebsite.com/images/gallery_photos/)”+items[a].childNodes[2].firstChild.nodeValue);  
//Below is the first dilemna - need to calculate where it goes…  
\_parent.projectimages[“item”+a].\_x =  
\_parent.projectimages.width+20_a;  
\_parent.projectimages[“item”+a].\_y = 0;  
\_parent.projectimages.imagemenu[“item”+a].\_x = 90_a;  
\_parent.projectimages.imagemenu[“item”+a].\_y = 60;

```
//Button Actions
_parent.projectimages.imagemenu["item"+a].onRollOver = function(){
        this.play();
  }
_parent.projectimages.imagemenu["item"+a].onRollOut = function(){
        this.play();
  }
 _parent.projectimages.imagemenu["item"+a].onRelease = function(){
        this.play();
     
  }

```

}  
}  
[/AS]  
Ok, so i need to calculate where the new image is placed, and also need to know its ACTUAL \_x value within the loadclip.
