I have an array of dynamically attached mc’s, and I want to set text in a textfield that is inside movieclip that is inside each one of the attached mc’s. I keep getting this error:
TypeError: Error #1010: A term is undefined and has no properties.
Here is the part of my code I’m having problems with. The mc is “square,” the mc inside of it is “thumbText_mc,” and the textfield inside of that is “hoverText”:
function createThumbs(){
var myXML:XML=new XML(xmlLoader.data);
for (var z:int = 0; z<(myXML.image.length()); z++){
var but:square = new square();
butContainer.addChild(but);
but.name = "button" + z;
butArray[z] = butContainer.getChildByName("button" + z);
butArray[z].x = (z*300);
butArray[z].y = 0;
butArray[z].buttonMode = true;
butArray[z].addEventListener(MouseEvent.CLICK, loadThumb);
var thumbs = butArray[z];
thumbs.num = z;
[COLOR=Red]thumbs.thumbText_mc.hoverText.text = (myXML.image[z].@capTwo);[/COLOR]
Thanks in advance