# Trace array from dynamic string with the same name

**URL:** <https://forum.kirupa.com/t/trace-array-from-dynamic-string-with-the-same-name/316066>\
**Category:** flash\
**Created:** [November 11, 2010, 3:44pm UTC](https://forum.kirupa.com/t/trace-array-from-dynamic-string-with-the-same-name/316066 "2010-11-11T15:44:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyg3r](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tyg3r/32/1341_2.png) [@Tyg3r](https://forum.kirupa.com/u/Tyg3r)\
**Post date:** [November 11, 2010, 3:44pm UTC](https://forum.kirupa.com/t/trace-array-from-dynamic-string-with-the-same-name/316066/1 "2010-11-11T15:44:24Z")

</div>

Hi

I’m not sure if this is at all possible, but I’ve been trying this for hours with no prevale. I can only presume I’m over complicating things.

I’ve generated a awkward looking string using variables, and arrays:

```auto
var someVar:string = "hello";
var myArray:Array = new Array("test0", "test1", "test2");

var myString:string = someVar+"World_"+myArray[2]);

```

So with that, the output of “myString”, would read: **helloWorld\_test2**

Thats all great, but I need to use that myString to call/trace a separate Array with the same name:

```auto
var helloWorld_test2:Array = new Array("option0", "option1", "option2");
trace (myString);

```

At the moment, when I trace myString… I will only get the actual string. Instead I need to convert that string to something that will allow me to call/trace the array and all it’s values.

Even if I did manage to convert the string, will there just be conflictions?

Cheers,

Mark
