# Targetting MC inside of MC problem!

**URL:** <https://forum.kirupa.com/t/targetting-mc-inside-of-mc-problem/306316>\
**Category:** flash\
**Created:** [March 12, 2010, 8:42pm UTC](https://forum.kirupa.com/t/targetting-mc-inside-of-mc-problem/306316 "2010-03-12T20:42:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Universe](https://avatars.discourse-cdn.com/v4/letter/u/9fc348/32.png) [@Universe](https://forum.kirupa.com/u/Universe)\
**Post date:** [March 12, 2010, 8:42pm UTC](https://forum.kirupa.com/t/targetting-mc-inside-of-mc-problem/306316/1 "2010-03-12T20:42:31Z")

</div>

Hi there!Got one issue recently!  
I have 10 MC that are generated inside of a for loop. Each MC got another MC inside of it that is already sitting on the stage and has it’s own instance ame applied! After that I put them inside of a MC container, that I also add dinamicly through the addChild method! But I have one issue when I want to change the position of the child MC(one that is sitting on the stage), through targetting to it’s instanceName!  
The code I use:

```auto
var box1_mc:Box1 = new Box1();
var ball1_mc:Ball1;
var balls:Array = new Array();
addChild(box1_mc);
 
for(var i:int = 0; i<10; i++)
{
	ball1_mc = new Ball1();
	box1_mc.addChild(ball1_mc);
	ball1_mc.name = "ball" + i;
	//ball1_mc.x += 5* box;
	trace(ball1_mc.name)
}
 
trace(box1_mc.getChildByName("ball1").innerBall_mc); // Prompt me an error #1119

```

So the question is - How can I target to an MC that is already inside of MC that was generated with the help of For loop?
