Multiple MC instances and Rollout function - Please Help

Hello,

I hacked together a bunch of code I’ve found throughout the most excellent Kirupa and added a bunch of stuff myself. (Mad props to Scotty and Seniculor (sp?) btw)

Everything I added works except the rollover function for multiple MC’s that are created when the gallery generates. I want the buttons to continue fading out after rollout. Once you roll in to another MC the rollout function stops. It should work like a “wave” effect when you roll over all the buttons quickly. I’ve played around with local variables, deleting enterframes, etc. etc. but just can’t get anything to work. I only included applicable code so please ignore any extra “}” I may have left in there when I pasted.

Thanks in advance!


function GeneratePortfolio(portfolio_xml, t) {
	//remove the old thumbs
	for (var i = 0; i<currentLength; i++) {
		//box is the mc inside menu_mc, where the thumbs are loaded
		menu_mc.box["thumbnail_mc"+i].removeMovieClip();
	}
	var portfolioPictures = portfolio_xml.childNodes;
	//set currentlength to the current amount of thumbs
	currentLength = portfolioPictures.length;
	for (var i = 0; i<portfolioPictures.length; i++) {
		var currentPicture = portfolioPictures*;
		//box is the mc inside menu_mc, where the thumbs are loaded
		var currentThumb_mc = menu_mc.box.createEmptyMovieClip("thumbnail_mc"+i, i);
		currentThumb_mc._x = 5+(i%columns)*thumb_spacing;
		currentThumb_mc._y = 5+Math.floor(i/columns)*thumb_spacing;
		currentThumb_mc.createEmptyMovieClip("thumb_container", 0);
		currentThumb_mc.thumb_container.loadMovie(currentPicture.attributes.thumb);
		//currentThumb_mc.title = currentPicture.attributes.title;
		currentThumb_mc.image = currentPicture.attributes.image;
		//currentThumb_mc.description = currentPicture.attributes.description;
		currentThumb_mc._alpha = 50;
		currentThumb_mc.onRollOver = function() {
			fadeUpClip(this);
		};
		currentThumb_mc.onRollOut = function() {
			fadeDownClip(this);
		};
		currentThumb_mc.onRelease = function() {
			fadeImage(this);
			//description_lv.load(this.description);
		};
	}
	function fadeUpClip(y) {
	this.onEnterFrame = function() {
		if (y._alpha<100) {
			y._alpha += 5;
		}
	};

}
function fadeDownClip(z) {
	this.onEnterFrame = function() {

		if (z._alpha>50) {
			z._alpha -= 10;
		}
	};

}