Hi all,
I'm making a flash gallery with XML, the thumbnails loads just fine but i cant figure out how to make the thumbnails clickable so that they can load the correct Image..
Here is the code i have so far:
Can someone help me out with this? I can write AS, but I'm not a real pro.Code:var galleryXML:XML = new XML(); galleryXML.ignoreWhite = true; this.createEmptyMovieClip("container_mc",this.getNextHighestDepth());//Container for the thumbs this.createEmptyMovieClip("theImage_mc",this.getNextHighestDepth()); //Movie Clip to hold larger Images theImage_mc._x = 0; theImage_mc._y = 0; container_mc._x = 0; container_mc._y = 481; //************* ONLOAD EVENT FOR THE XML DATA*******\\ galleryXML.onLoad = function(success){ if(success) { var myImages:Array = galleryXML.firstChild.childNodes; //trace(myImages); for(i=0;i<myImages.length;i++){ thumb_mc = container_mc.createEmptyMovieClip("thumb_mc" + i,i); clipLoader.loadClip("thumb/" + myImages[i].attributes.thumb_url,thumb_mc); thumb_mc.loadMovie("thumb/" + myImages[i].attributes.thumb_url); thumb_mc._x = 105*i; imgURL = "images/" + myImages[i].attributes.full_url; theImage_mc.loadMovie(imgURL); } }//end if else { trace("I'm dead"); }//end else } galleryXML.load("gallery2.xml");
Thanks in advance




Reply With Quote