# Dynamically Naming Variables in AS 3

**URL:** <https://forum.kirupa.com/t/dynamically-naming-variables-in-as-3/233273>\
**Category:** flash\
**Created:** [July 22, 2007, 7:07am UTC](https://forum.kirupa.com/t/dynamically-naming-variables-in-as-3/233273 "2007-07-22T07:07:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GenericUserName](https://avatars.discourse-cdn.com/v4/letter/g/5fc32e/32.png) [@GenericUserName](https://forum.kirupa.com/u/GenericUserName)\
**Post date:** [July 22, 2007, 7:07am UTC](https://forum.kirupa.com/t/dynamically-naming-variables-in-as-3/233273/1 "2007-07-22T07:07:42Z")

</div>

Hello all,

I am having some issues dynamically creating/naming variables. I’ve seen plenty of posts on this for prior AS versions. But how the heck do I go about this in AS 3? I’m certain that this is wrong but I am looking to go about it some way similar to this:

```auto
var i:Number;
var _i:*;
for (i=1; i<11; i++) {
var _i:SomeClass = new SomeClass();
}

```

I am certain that the wrongness of this code will make some of you cringe. But please forgive my ignorance as I try to work through this. I am just trying to streamline my code a bit.

Thanks in advance.
