# Concatenate a target path? (!what a title...)

**URL:** <https://forum.kirupa.com/t/concatenate-a-target-path-what-a-title/271199>\
**Category:** Uncategorized\
**Created:** [September 19, 2008, 4:43pm UTC](https://forum.kirupa.com/t/concatenate-a-target-path-what-a-title/271199 "2008-09-19T16:43:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pensamente](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pensamente/32/1208_2.png) [@pensamente](https://forum.kirupa.com/u/pensamente)\
**Post date:** [September 19, 2008, 4:43pm UTC](https://forum.kirupa.com/t/concatenate-a-target-path-what-a-title/271199/1 "2008-09-19T16:43:37Z")

</div>

well, go basics!

simple question, I’ve a TextField nested inside some MovieClips in the stage, and I want to set the text, like so:

[AS]this.root\_mc.child\_0\_mc.textF\_txt.text = ‘123’;[/AS]

If I want to put this inside a for loop, would this code be correct:

[AS]  
for (var i:int = 0; i\<10; i++)  
{  
this.root\_mc[‘child\_’+i+’\_mc’].textF\_txt.text = ‘123’;  
}  
[/AS]

although it works the idea that it gives is that I could be calling for an array called ‘root\_mc’ inside the for loop, and not referencing a MovieClip in stage. How far am I from reality?! An alternative way to do this would be?..

🙂

thanks
