# Modify dynamic text box inside a MovieClip from AS3

**URL:** <https://forum.kirupa.com/t/modify-dynamic-text-box-inside-a-movieclip-from-as3/302489>\
**Category:** Uncategorized\
**Created:** [January 1, 2010, 12:39pm UTC](https://forum.kirupa.com/t/modify-dynamic-text-box-inside-a-movieclip-from-as3/302489 "2010-01-01T12:39:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marco\_stolle](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@marco\_stolle](https://forum.kirupa.com/u/marco_stolle)\
**Post date:** [January 1, 2010, 12:39pm UTC](https://forum.kirupa.com/t/modify-dynamic-text-box-inside-a-movieclip-from-as3/302489/1 "2010-01-01T12:39:46Z")

</div>

Hello,

i’m struggling with the following, i’m building an xml based flash menu. For the buttons I used a MovieClip ‘mainMenuItem’ that contains the MovieClips ‘MenuBackground’, ‘menuBlueLine’ and ‘menuText’, all of them with the exported for AS and export in frame 1 checked.

in the following code i am trying to get the text of an array into the dynamically build menu.

```auto

var menuHoogte:int=34;
var menuY:int=0;
var menuArray:Array=new Array();
menuArray[0]="item1";
menuArray[1]="item2";
menuArray[2]="item3";
menuArray[3]="item4";
menuArray[4]="item5";

function parseMenu():void {
	//----------------------
	for (var i:int=0; i<menuArray.length; i++) {

		var newMainMenuItem:mainMenuItems = new mainMenuItems();
		newMainMenuItem.x=0;
		newMainMenuItem.y=menuY;
		var newBlueLine:menuBlueLine = new menuBlueLine();
		var newLabel:menuText=new menuText();
		var labelText:String=menuArray*;
		newLabel.text=labelText;
		trace("labeltext: "+labelText);
		this.addChild(newMainMenuItem);
		this.addChild(newLabel);
		menuY+=menuHoogte;
	}//for(var i:int=0; i<menuArray.length; i++)
}
parseMenu();

```

The newMainMenuItem appears as it should, 5 times but the labels are empty.

can anyone help please?

thanks

Marco
