0
votes
setProperty("tvmenuitem"+i, _x, "300");

works fine.

However how can I set times.text = "1234";

I tried: setProperty("tvmenuitem"+i, times.text, "1234"); But I get a syntax error.

Property name expected in GetProperty.

My Other problem is

setProperty("tvmenuitem"+i, _y, 100*i);

doesn't seem to work, the movie clip isn't moved. :( If it has to be string how to I typecast it?

1

1 Answers

0
votes

You don't need to use the setProperty function, it is deprecated.

Assuming the numbered tvmenuitems are in the current scope and that times is a TextFiled that is a child of the tvmenuitem, you can use this kind of syntax:

this["tvmenuitem"+i]._x = 300;
this["tvmenuitem"+i]._y = 100*i;
this["tvmenuitem"+i].times.text = "1234";