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/”+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+20a;
_parent.projectimages[“item”+a]._y = 0;
_parent.projectimages.imagemenu[“item”+a]._x = 90a;
_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.