Actionscript 2 - setProperty
setProperty("tvmenuitem"+i, _x, "300");
works fine.
However how can I set times.text = "1234";
I tried: setProperty("tvmenuitem"+i, times.开发者_JAVA技巧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?
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";
精彩评论