# Turning XML loaded images into pressable buttons

**URL:** <https://forum.kirupa.com/t/turning-xml-loaded-images-into-pressable-buttons/267859>\
**Category:** Uncategorized\
**Created:** [August 6, 2008, 2:49pm UTC](https://forum.kirupa.com/t/turning-xml-loaded-images-into-pressable-buttons/267859 "2008-08-06T14:49:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![beard86](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@beard86](https://forum.kirupa.com/u/beard86)\
**Post date:** [August 6, 2008, 2:49pm UTC](https://forum.kirupa.com/t/turning-xml-loaded-images-into-pressable-buttons/267859/1 "2008-08-06T14:49:42Z")

</div>

Hi, I’m looking to find out how to turn individual thumbnails I’ve loaded through XML into pressable buttons that each have different functions.  
here is the code I’m using to display the XML …

```auto
function callThumbs() {
_root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
container_mc._x = _root.gallery_x;
container_mc._y = _root.gallery_y;

var clipLoader = new MovieClipLoader();
var preloader = new Object();
clipLoader.addListener(preloader);

for (i=0; i<_root.myImagesTotal; i++) {
thumbURL = myImages*.attributes.thumb_url;

myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth() );
myThumb_mc._x = _root.thumb_width*i;
clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);

preloader.onLoadComplete=function(target){
target.onRelease=function(){
callFullImage(this._name);
}
}
preloader.onLoadStart = function(target) {
target.createTextField("my_txt",target.getNextHighestDepth,0,0,100,20);
target.my_txt.selectable = false;
};

preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
};

preloader.onLoadComplete=function(target){
target.my_txt.removeTextField();
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .1, true);
target.onRelease=function(){
callFullImage(this._name);
}
target.onRollOver=function(){
this._alpha=50;
};

target.onRollOut=function(){
this._alpha=100;
};
}
}
}

```

Thanks if anyone can help  
C
