作者flare321 (flare)
看板Flash
标题[问题] 元件库复制的mc如何命名并操控它
时间Mon Nov 29 15:54:51 2010
我从元件库复制出mc,要怎麽命名并操控它?我下面的写法不行,
请问要如何改,谢谢
for(var i:int=0; i<=3; i++){
var star:MovieClip = new _starMC()
this.addChild(star)
star.name ="p"+i
star.x=i*50;
star.y=i*30+10;
}
p0.x=0
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.130.167.185
1F:推 cash10621:试试 getChildByName 11/29 20:51
2F:→ dsmwang:也可以把for产生的star用阵列包着,然後控制阵列元素。 11/29 23:59