# How do i create a movieClip based on a predefined number?

**URL:** <https://forum.kirupa.com/t/how-do-i-create-a-movieclip-based-on-a-predefined-number/323617>\
**Category:** Uncategorized\
**Created:** [July 9, 2011, 7:36pm UTC](https://forum.kirupa.com/t/how-do-i-create-a-movieclip-based-on-a-predefined-number/323617 "2011-07-09T19:36:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oluc](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@oluc](https://forum.kirupa.com/u/oluc)\
**Post date:** [July 9, 2011, 7:36pm UTC](https://forum.kirupa.com/t/how-do-i-create-a-movieclip-based-on-a-predefined-number/323617/1 "2011-07-09T19:36:35Z")

</div>

I am trying to create movieClips in a loop based on a predefined amount. I want to have the variables defined as btn1, btn2, btn3 etc.

this is what i have done but i don’t know how to put the number in the variable name and then push all of the buttons into an array:

```auto

btnLL=[];
for (var i:uint=1; i<languagesIndex; i++) {
     var btn*:MovieClip = new MovieClip(); //"*:" part is wrong but what is right way?
     btnLL.push(btn*); //also how does one push all of the btns into this array?
}

```

do you know how to do this?
