Event handlers for dynamically created mc's

Hi Kirupaworld!

So im stuck in a bit of a rut trying to create a menu dynamically from an array. I know there is a way to circumnavigate the issues i am having by making another array with linkNames in it (i think), but im trying to understand why this isnt working. Check this out.


var playerArray:Array = ["THIERY","FIGO", "RONALDINO", "WAYNE"];
var contents:MovieClip = this.createEmptyMovieClip("contents", this.getNextHighestDepth());
for(var i:Number=0; i<playerArray.length;i++){
	var menuItem:MovieClip = contents.createEmptyMovieClip("menuItem", contents.getNextHighestDepth());
	var currItem:MovieClip = menuItem.attachMovie("menuItem", "menuItem"+i, contents.getNextHighestDepth());
	menuItem._y = 20+(menuItem._height*i);
	currItem.xmlText.text = playerArray*;
	currItem.xmlText.embedFonts = true;
	currItem.currVar = i;
	currItem.onRollOver = function():Void{
		this.xmlText.textColor = 0xCC0000;
	}
	currItem.onRollOut = currItem.onDragOut = function():Void{
		this.xmlText.textColor = 0x000000;
	}
	currItem.onRelease = function():Void{
		loadMovie("p"+currItem.currVar, _parent.participant);
		_parent.disMsg.text = "BIOGRAPHY COMING SOON";
	}
	if(i==playerArray.length-1){
		this.gotoAndStop(2);
	}
}

‘currItem.currVar’, in my eyes, should be assigned the value of ‘i’ at that time in the loop, then move on to the next currItem right?
Tracing ‘currItem’ traces ‘menuItem.menuItem’+i to the output window fine, so im assuming that currItem is indeed a reference to a unique clip to which assign an action. The catch is, its not assigning the action I want, its assigning the value of ‘i’ at the end of the loop to all currVar’s.
I recently read a post explaining this conumdrum, stating that “variables are not “burnt” into functions when they are placed there. They will reflect the variable, where ever it may exist at the time it was requested, not at the time the function using that variable was defined,” but in this case, since I am assigning the value of ‘i’ to anothing variable inside my dynamic movieClip, I would think that this wouldnt be an issue :? I am clearly thinking wrong.
Can anyone help pull the cloak out from my eyes?

Thanks in advance!!