# Adding menu items on-the-fly

**URL:** <https://forum.kirupa.com/t/adding-menu-items-on-the-fly/256528>\
**Category:** Uncategorized\
**Created:** [April 3, 2008, 8:45pm UTC](https://forum.kirupa.com/t/adding-menu-items-on-the-fly/256528 "2008-04-03T20:45:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alber\_Kidd](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Alber\_Kidd](https://forum.kirupa.com/u/Alber_Kidd)\
**Post date:** [April 3, 2008, 8:45pm UTC](https://forum.kirupa.com/t/adding-menu-items-on-the-fly/256528/1 "2008-04-03T20:45:01Z")

</div>

I want to create a submenu from my array.

var subArray:Array = new Array(“aboutUs”, “whoweare”, “whatwedo”);

I need to

(i) create a button for each of the an instance name from the array

(ii) add the name to the button in a textbox

(iii) fade the button on to the stage

The fundemental problem I have is creating the buttons by iterating thougth a loop.

Any help would be great
