# How to dynamically create Object’s trough for loop?

**URL:** <https://forum.kirupa.com/t/how-to-dynamically-create-object-s-trough-for-loop/250350>\
**Category:** flash\
**Created:** [January 28, 2008, 8:21pm UTC](https://forum.kirupa.com/t/how-to-dynamically-create-object-s-trough-for-loop/250350 "2008-01-28T20:21:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bojan](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@Bojan](https://forum.kirupa.com/u/Bojan)\
**Post date:** [January 28, 2008, 8:21pm UTC](https://forum.kirupa.com/t/how-to-dynamically-create-object-s-trough-for-loop/250350/1 "2008-01-28T20:21:27Z")

</div>

[FONT=Arial]Hi,[/FONT]  
[FONT=Arial]I want to dynamically create 10 Objects trough for loop. Each Object should have unique name.[/FONT]  
[FONT=Arial]In previous version od AS you could sove this with these lines of code:[/FONT]

```auto

[FONT=Arial]for(var i:Number = 0; i<10; i++)[/FONT]
{
this["myObject" + i] = new Object();
}

```

How to do this in AS3?

```auto

[FONT=Arial]for(var i:Number = 0; i<10; i++)[/FONT]
{
var myObject:Object = new Object(); //How to setup uniqu Object name?
}

```

Thanks,
