Help with numerical values

This ActionScript is creating reading an XML file, and laying out thumbnail images. I’m stuck though! Each thumbnail is given a value of thumbnail[x], going from 0-5. **I wrote some mouse actions and need to access each thumbnail’s number, not entire name (where I have it in red below). **

“this” actually equals “thumbnails.thumbnail0”, “thumbnails.thumbnail1”, etc. But I need just the # on the end of that.

Can any AS guru’s out there help me?

myPhoto = new XML();
 myPhoto.ignoreWhite = true;
 myPhoto.onLoad = function(success) {
 	numimages = this.firstChild.childNodes.length;
 	spacing = 62;
 	for (i=0; i<numimages; i++) {
 		picHolder = this.firstChild.childNodes*;
 		thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
 		thumbHolder._x = i*spacing;
 		thumbLoader = thumbholder.createEmptyMovieClip("thumbnail_image", 0);
 		thumbLoader.loadMovie(picHolder.attributes.thmb);
 		thumbHolder.title = picHolder.attributes.title;
 		thumbHolder.main = picHolder.attributes.main;
  
 		thumbHolder.onRelease = function() {
 			closeoutOver([color=Red]this[/color]);
 			loader.box.loadMovie(this.main);
 			over.over([color=Red]this[/color]).gotoAndStop(3);
 		};
 
 		thumbHolder.onRollover = function() {
 		if (over.over([color=Red]this[/color])._currentframe == 3) {
 			over.over([color=Red]this[/color]).stop();
 		}else{	
 			over.over([color=Red]this[/color]).gotoAndStop(2);
 		}
 		};
 
 		thumbHolder.onRollout = function() {
 		if (over.over([color=Red]this[/color])._currentframe == 3) {
 			over.over([color=Red]this[/color]).stop();
 		}else{	
 			over.over([color=Red]this[/color]).gotoAndStop(1);
 		}
 		};
 }
 
 }