All pastes #376116 Raw Edit

Something

public text v1 · immutable
#376116 ·published 2007-02-28 21:14 UTC
rendered paste body
theXML.onLoad = function(bSuccess:Boolean) {
	if(bSuccess) {
		aImages = mx.xpath.XPathAPI.selectNodeList(this.firstChild,"/*/button");
		iLen = aImages.length;
		var thumbCont:MovieClip = bigCont.createEmptyMovieClip("thumbCont",bigCont.getNextHighestDepth());
		for(i=0;i<iLen;i++) {
		var theThumb:MovieClip = thumbCont.createEmptyMovieClip("thumb"+i,thumbCont.getNextHighestDepth());
		var iCont:MovieClip = theThumb.createEmptyMovieClip("thumbImage",theThumb.getNextHighestDepth());
		theThumb._id = i;
		theThumb._imageFile = this.firstChild.childNodes[i].attributes.image;
		theThumb._caption = this.firstChild.childNodes[i].attributes.caption;
		thumbLoader.loadClip(this.firstChild.childNodes[i].attributes.thumb,iCont);
		theThumb.onRelease = function() {
			loadImage(this._id);
			//theLoader.loadClip(this._imageFile,viewer.iCont);
			theCaption.text = this._caption;
			currentIndex = this._id;
		}
		theThumb._x = lastX*40;
		theThumb._y = lastY*40;
		
		if(lastX == rowNum) {
			lastX = 0;
			lastY++;
		}
		//if(i%rowNum == 0) {
			//lastY += 50;
			//lastX = 0;
		//}
		//else {
			///lastX += 50;
			//lastY += 0;
		//}
}
        loadImage(currentIndex);
			
	}
}