# Access mc inside dynamically attached mc? Please help!

**URL:** <https://forum.kirupa.com/t/access-mc-inside-dynamically-attached-mc-please-help/235306>\
**Category:** flash\
**Created:** [August 10, 2007, 4:17am UTC](https://forum.kirupa.com/t/access-mc-inside-dynamically-attached-mc-please-help/235306 "2007-08-10T04:17:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfey](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mfey/32/3661_2.png) [@mfey](https://forum.kirupa.com/u/mfey)\
**Post date:** [August 10, 2007, 4:17am UTC](https://forum.kirupa.com/t/access-mc-inside-dynamically-attached-mc-please-help/235306/1 "2007-08-10T04:17:35Z")

</div>

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”:

```auto
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
