开发者

Actionscript 2 - setProperty

开发者 https://www.devze.com 2023-01-25 23:28 出处:网络
setProperty(\"tvmenuitem\"+i, _x, \"300\"); works fine. However how can I set times.text = \"1234\"; I tried:
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";
0

精彩评论

暂无评论...
验证码 换一张
取 消