# Attach premade button to every image loaded from xml?

**URL:** <https://forum.kirupa.com/t/attach-premade-button-to-every-image-loaded-from-xml/173150>\
**Category:** Uncategorized\
**Created:** [December 21, 2005, 6:16pm UTC](https://forum.kirupa.com/t/attach-premade-button-to-every-image-loaded-from-xml/173150 "2005-12-21T18:16:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fourleafstudios](https://avatars.discourse-cdn.com/v4/letter/f/46a35a/32.png) [@fourleafstudios](https://forum.kirupa.com/u/fourleafstudios)\
**Post date:** [December 21, 2005, 6:16pm UTC](https://forum.kirupa.com/t/attach-premade-button-to-every-image-loaded-from-xml/173150/1 "2005-12-21T18:16:38Z")

</div>

I am trying to add a button to every image loaded from an xml file, so that when the image is rolled over the button does something on top of it.

I have made the button and given it the linkage id of thumbOver.

[AS]  
function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
thumbs = [];  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
thumbs\* = xmlNode.childNodes\*.childNodes[4].firstChild.nodeValue;  
thumbnailer(i);  
}  
} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“testing.xml”);

function thumbnailer(k) {  
var newthumb:MovieClip = thumbnail\_mc.createEmptyMovieClip(“t”+k,thumbnail\_mc.getNextHighestDepth());  
var thumboverC:MovieClip = newthumb.createEmptyMovieClip(“thethumbover”,newthumb.getNextHighestDepth())  
thumboverC.attachMovie(“thumbOver”,“mythumbover”,thumboverC.getNextHighestDepth())

```
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
    target_mc._x = hit_left._x+(target_mc._width+5)*k;

};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbs[k], "thumbnail_mc.t"+k);

```

}[/AS]  
The thumbnails come up fine, but the button doesnt make a showing and i cannot see why not. Can anyone tell me why it isnt showing up?
