# Problems with Arrays and Variables

**URL:** <https://forum.kirupa.com/t/problems-with-arrays-and-variables/207115>\
**Category:** flash\
**Created:** [November 14, 2006, 8:53pm UTC](https://forum.kirupa.com/t/problems-with-arrays-and-variables/207115 "2006-11-14T20:53:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![misterpatrick](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@misterpatrick](https://forum.kirupa.com/u/misterpatrick)\
**Post date:** [November 14, 2006, 8:53pm UTC](https://forum.kirupa.com/t/problems-with-arrays-and-variables/207115/1 "2006-11-14T20:53:00Z")

</div>

Hello all,

I am having some weirdness with arrays and variables. I’m sure this is something basic but I can’t get it to work. I have a an MC name “circle” this also contains dynamic text field name nameMC. Writing to that textfield is simply circle.nameMC.text = “New copy”;

So below I have two arrays.

```auto
var textArray:Array = [one, two, three];
var newArray:Array = ["one", "two", "three"];
for (var i:String in newArray) {
    this.attachMovie("circle", newArray*, this.getNextHighestDepth(), {_x:Math.random()*300, _y:Math.random()*200});
       textArray*.nameMC.text = newArray*;

}

```

This doesn’t work. I’ve tried swapping the various arrays but no luck. So why does the movieclip want to use the “quoted” array value and not the unquoted. Also, when I use"

```auto
one.nameMC.text = "hello";

```

everything works fine, but the arrays won’t. So:

```auto
textArray*.nameMC.text = "hello";

```

for example doesn’t work.

Thanks for any guidance!
