# Multiple buttons in as3

**URL:** https://forum.kirupa.com/t/multiple-buttons-in-as3/239066
**Category:** flash
**Created:** [September 18, 2007, 2:01pm UTC](https://forum.kirupa.com/t/multiple-buttons-in-as3/239066 "2007-09-18T14:01:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RubenDoliveira](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rubendoliveira/32/3905_2.png) [@RubenDoliveira](https://forum.kirupa.com/u/RubenDoliveira)
#### Post date: [September 18, 2007, 2:01pm UTC](https://forum.kirupa.com/t/multiple-buttons-in-as3/239066/1 "2007-09-18T14:01:45Z")

</div>

Hi everyone,

I’m trying but I can’t work this out.  
I have a single movieclip named button, and I want to use a “for” to multiply that movieclip, that way I can have multiple buttons and edit them all in a single function.

It would be something like this:

var \_button = new button;

for(i=0; i\<5;i++){  
\_button\*:button = new button;  
addChild(button\*);  
}

I’ve searched but I can’t find any thread with this.  
Thanks in advance.
