Need help referencing Specific variables

I’m trying to make the jump from As2 to As3 as a designer with limited developer skills and this issue has been stumping me for the last 2 days. I’ve looked around quite a bit and tried a bunch of different solutions but I must be overlooking something simple or I’m just clueless as to what I need to be searching for in the first place.

Alright here is what I’m trying to do with this code. I’m pulling in external data from an XML file and finding any of the “PlanningIdeas” that have a “false” HighPricePoint. Then I’m pushing the name and size of those items into an array and looping through that array to list them out on the stage for me. This all works fine but I need the items to function as buttons that will trace out the information Ive assigned to each movieclip while placing them on the stage. What its tracing out right now is merely the information for the very last movieClip Ive placed. I’m not sure how to reference the others when the variables get overwritten each time. Any help or suggestions with this are greatly appreciated.

Heres the code:

var xml:XML = new XML();
var req:URLRequest = new URLRequest(“PlanningIdeasData.xml”);
var loader:URLLoader = new URLLoader(req);
var tempArray:Array = new Array();
var curName:placeHolder;
loader.addEventListener(“complete”, xmlLoaded);
function xmlLoaded(event:Event):void {
xml = XML(loader.data);
var i:int=0;
var xPos = 100;
var yPos = 100;
//if this condition is met it pushes whatever variables I want into the array
for each (var PlanningIdea:XML in xml.PlanningIdea) {
if (PlanningIdea.HighPricePoint == false) {
tempArray.push({Name:PlanningIdea.Name, Size:PlanningIdea.CAP_2D.Size});
}
}
if (tempArray.length > 0) {
while (i < tempArray.length) {
curName = new placeHolder();
curName.Name = "curName "+i;
curName.Size = tempArray*.Size;
this.addChild(curName);
curName.buttonMode = true;
curName.mouseChildren = false;
curName.holderText.text = tempArray*.Name;
curName.x = xPos;
curName.y = yPos;
curName.addEventListener(MouseEvent.CLICK, textClick);
function textClick(event:Event) {
trace(curName.Name);
trace(curName.Size);
}
yPos += 30;
i++;
}
} else {
trace(“sorry, no luck jack”);
}
}