开发者

AS2 Dynamic MovieClip Selection

开发者 https://www.devze.com 2023-01-06 02:23 出处:网络
If I have moviecl开发者_C百科ips called \"test1\", \"test2\" and \"test3\" in the _root, I can use:

If I have moviecl开发者_C百科ips called "test1", "test2" and "test3" in the _root, I can use:

for(i = 1; i <= 3; i++){
   _root['test'+i]._x = 100;
}

How do i use the "_root['mc']" selection method if all my test mc's are in another mc called layout.

I have tried this but got a syntax error.

for(i = 1; i <= 3; i++){
   layout.['test'+i]._x = 100;
}    


I think you are getting the syntax error because you have layout.['test'+i] instead of layout['test'+i]

0

精彩评论

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

关注公众号