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 …
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