# Dynamic Array //heeeeelp!

**URL:** https://forum.kirupa.com/t/dynamic-array-heeeeelp/60170
**Category:** flash
**Created:** [August 7, 2004, 5:33am UTC](https://forum.kirupa.com/t/dynamic-array-heeeeelp/60170 "2004-08-07T05:33:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![thesignx](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@thesignx](https://forum.kirupa.com/u/thesignx)
#### Post date: [August 7, 2004, 5:33am UTC](https://forum.kirupa.com/t/dynamic-array-heeeeelp/60170/1 "2004-08-07T05:33:57Z")

</div>

var menuArray:Array = new Array(“submenuitem01\_mc” etc…);  
for (var i in menuArray) {  
this.attachMovie(“submenuitem”, menuArray\*, i);  
this[menuArray\*].\_x = 0;  
this[menuArray\*].\_y = (i_17);  
this[menuArray_].menuitemtag\_mc.buttontext =  
myObject.paradisevillage.menuitems[0].item\*.\_value;  
}

//Comments  
Everything seems to work fine exept line:  
this[menuArray\*].menuitemtag\_mc.buttontext = myObject.paradisevillage.menuitems[0].item\*.\_value;

//Im using XML2bject which works fine, the wird thing is that I eaven don´t get an UNDEFINE error, Why? Whats Wrong!!!

HELP! PLEASE!!! :love:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 7, 2004, 7:01am UTC](https://forum.kirupa.com/t/dynamic-array-heeeeelp/60170/2 "2004-08-07T07:01:59Z")

</div>

if you’re putting the array into a txt field, make sure you’ve embedded the font outline… flash is weird like that 🙂

:p:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 7, 2004, 2:17pm UTC](https://forum.kirupa.com/t/dynamic-array-heeeeelp/60170/3 "2004-08-07T14:17:55Z")

</div>

I am assuming buttontext is a textfield placed in the menuitemtag\_mc movieclip. To set the text in a textfield you need to use the text property of the textfield.(or htmltext if it is an html textfield).

```auto

 this[menuArray*].menuitemtag_mc.buttontext **.text** = myObject.paradisevillage.menuitems[0].item*._value;

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 7, 2004, 2:39pm UTC](https://forum.kirupa.com/t/dynamic-array-heeeeelp/60170/4 "2004-08-07T14:39:44Z")

</div>

Let me try that, but actually “buttontext” is a variable given to the text field, I was thinking that my sintax would have an error at some point. I never use an array value to make reference to a movie clip before.

Thanks, I let you know what happens

P.D. This script is placed on the main time line where all buttos are being placed by the same script.
