# How to dynamically create and name arrays?

**URL:** <https://forum.kirupa.com/t/how-to-dynamically-create-and-name-arrays/194533>\
**Category:** flash\
**Created:** [July 24, 2006, 1:36pm UTC](https://forum.kirupa.com/t/how-to-dynamically-create-and-name-arrays/194533 "2006-07-24T13:36:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![schmichael](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@schmichael](https://forum.kirupa.com/u/schmichael)\
**Post date:** [July 24, 2006, 1:36pm UTC](https://forum.kirupa.com/t/how-to-dynamically-create-and-name-arrays/194533/1 "2006-07-24T13:36:35Z")

</div>

Hello, there. I always seem to have problems when there are square brackets involved in naming things:crazy:

What I am trying to do is dynamically name an array. I have been trying to do it like this:

```
 ActionScript Code:
 [FONT=Courier New][LEFT][COLOR=#000000] **var** [/COLOR] myI:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]1[/COLOR];

```

[COLOR=#000000] **var** [/COLOR] [COLOR=#000000][[/COLOR][COLOR=#ff0000]“tmpAr”[/COLOR]+myI[COLOR=#000000]][/COLOR]:[COLOR=#0000ff]Array[/COLOR] = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]Array[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000080]1[/COLOR], [COLOR=#000080]2[/COLOR], [COLOR=#000080]3[/COLOR], [COLOR=#000080]4[/COLOR], [COLOR=#000080]5[/COLOR], [COLOR=#000080]6[/COLOR], [COLOR=#000080]7[/COLOR], [COLOR=#000080]8[/COLOR], [COLOR=#000080]9[/COLOR], [COLOR=#000080]10[/COLOR], [COLOR=#000080]11[/COLOR], [COLOR=#000080]12[/COLOR], [COLOR=#000080]13[/COLOR], [COLOR=#000080]14[/COLOR], [COLOR=#000080]15[/COLOR], [COLOR=#000080]16[/COLOR][COLOR=#000000])[/COLOR]

[COLOR=#000000] **var** [/COLOR] [COLOR=#000000][[/COLOR][COLOR=#ff0000]“tmpAr”[/COLOR]+myI[COLOR=#000000]][/COLOR] = [COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR], [COLOR=#000080]2[/COLOR], [COLOR=#000080]3[/COLOR], [COLOR=#000080]4[/COLOR], [COLOR=#000080]5[/COLOR], [COLOR=#000080]6[/COLOR], [COLOR=#000080]7[/COLOR], [COLOR=#000080]8[/COLOR], [COLOR=#000080]9[/COLOR], [COLOR=#000080]10[/COLOR], [COLOR=#000080]11[/COLOR], [COLOR=#000080]12[/COLOR], [COLOR=#000080]13[/COLOR], [COLOR=#000080]14[/COLOR], [COLOR=#000080]15[/COLOR], [COLOR=#000080]16[/COLOR][COLOR=#000000]][/COLOR];  
[/LEFT]  
[/FONT]

Which isn’t working. Would someone please tell me where I can stick my square brackets ?  
Thanks,  
Schm
