# Error #1006: getChildByName is not a function

**URL:** <https://forum.kirupa.com/t/error-1006-getchildbyname-is-not-a-function/327582>\
**Category:** Uncategorized\
**Created:** [March 11, 2012, 6:11pm UTC](https://forum.kirupa.com/t/error-1006-getchildbyname-is-not-a-function/327582 "2012-03-11T18:11:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheOtherTedium](https://avatars.discourse-cdn.com/v4/letter/t/58f4c7/32.png) [@TheOtherTedium](https://forum.kirupa.com/u/TheOtherTedium)\
**Post date:** [March 11, 2012, 6:11pm UTC](https://forum.kirupa.com/t/error-1006-getchildbyname-is-not-a-function/327582/1 "2012-03-11T18:11:31Z")

</div>

I’m trying to use the getChildByName function and for some reason it’s not working. Here’s the line that is causing the error of “TypeError: Error #1006: getChildByName is not a function.”

```php
var contactBox:MovieClip = anyBox.getChildByName("earthBox" + i);

```

It is in a for loop and is definitely calling to a movieclip of the correct name in the MC array anyBox. I’ve searched the internet and haven’t found anything (On the first page of google…) Any advice?
