Dynamic Array //heeeeelp!

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 = (i17);
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:

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

:p:

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).


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

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.