# Dynamic Text Question

**URL:** <https://forum.kirupa.com/t/dynamic-text-question/246274>\
**Category:** Uncategorized\
**Created:** [December 9, 2007, 11:08am UTC](https://forum.kirupa.com/t/dynamic-text-question/246274 "2007-12-09T11:08:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![h3liumX](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@h3liumX](https://forum.kirupa.com/u/h3liumX)\
**Post date:** [December 9, 2007, 11:08am UTC](https://forum.kirupa.com/t/dynamic-text-question/246274/1 "2007-12-09T11:08:34Z")

</div>

I have several dynamic text controls that I want to access similarly to how you can access an array of controls:

// For example I know you can do something like this

```auto
control_array = new Array(txt1, txt2, txt3); //txt1...etc are instance names
for(i=0;i<whatever;i++)
  control_array*._visible = true; // here, accessing them through the array

```

Now, since I have dynamic text controls I want to set the variable name (not the instance name) to a value in a for loop like this in order to change the text. Something like:

```auto
control_vars_array = new Array(var1, var2, var3); //now var1...etc are the text variable names
 for(i=0;i<whatever;i++)
   control_vars_array*.= sometext*;// this of course wont work

```

Hopefully this makes sense. Does anyone know if there is a way to do this? Can I have an array of string variable names then somehow make them reference the variables? Thanks for any help.
