Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从 AS3 的库中获取所有名为“itemX”(其中 X 是数字)的项目。我该怎么做?如果不可能,有没有办法做类似的事情?
for (var i = 0; i < 3; i++) { var myItem:Class = getDefinitionByName("item" + i.toString()) as Class; addChild(new myItem); }
退货:
var mc:MovieClip = new myItem(); return mc;