# Dynamically Targeting a Path from an MC

**URL:** <https://forum.kirupa.com/t/dynamically-targeting-a-path-from-an-mc/291038>\
**Category:** flash\
**Created:** [June 23, 2009, 10:43pm UTC](https://forum.kirupa.com/t/dynamically-targeting-a-path-from-an-mc/291038 "2009-06-23T22:43:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibsen](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@ibsen](https://forum.kirupa.com/u/ibsen)\
**Post date:** [June 23, 2009, 10:43pm UTC](https://forum.kirupa.com/t/dynamically-targeting-a-path-from-an-mc/291038/1 "2009-06-23T22:43:12Z")

</div>

I have a function and some textfields within a movieclip, and I need to reference those textfields dynamically. This worked when I’d had the TFs on the stage, but not since I’ve placed them in an MC.

The TF naming convention works out to this:

```auto
t_t1c1r1
t_t1c2r1
t_t1c1r2
t_t1c2r2
t_t1c1r3
t_t1c2r3

```

And so on.

So, to access them dynamically, I combine the letters with index numbers to be gotten through the function’s arguments.

```auto
this['t_t1c'+i+'r'+ii].text;
Object(this)['t_t1c'+i+'r'+ii].text;

```

The numbers represented by “i” and “ii” are coming through fine in trace, but the path is still wrong. I’ve tried different combinations of \_level0, etc., but it only works in my testing when I make an absolute reference to the field (e.g. Object(\_level0.mc\_instance)[‘t\_t1c’+i+‘r’+ii].text which is not a viable solution).
