Child access issue

Ok, so I have a form in my program where people can check off individual buttons using click event listeners. This works great.

Now I am trying to add a “Select All” button. This loops through all of the MovieClips in the main sprite container and accesses a mask to move it into place in order to un-hide the actual check mark.

Here’s my code:


        private function selectAll(e:MouseEvent):void {
            var newX:int;
            
            if(allSelected) {
                newX = -70;
                allSelected = false;
            } else {
                newX = -5;
                allSelected = true;
            }
            
            for each(var mc:MovieClip in configsContainer) {
                var cb:MovieClip = mc.getChildByName("checkbox");
                TweenMax.to(cb.checkMask,.2,{x:newX});
            }
        }

The error that I get refers to this line:


var cb:MovieClip = mc.getChildByName("checkbox");

Here is the error I get at compile time:


1118: Implicit coercion of a value with static type flash.display:DisplayObject to a possibly unrelated type flash.display:MovieClip.

Any ideas?