描述:
创建了10个sprite,每个sprite里面有一个animation,最终只有第一个sprite的animation能够显示。(跟官方微信飞机结构类似)
问题截图:

代码:
for (var i:int=0;i<10;i++){
var p:wheel=Pool.getItemByClass("wheel", wheel);
p.pos(i*90+100,200);
p.init();
roleLayer.addChild(p)
}
/////////////wheelas.as
public function wheel(){
this.graphics.drawCircle(0,0,40,"#fff");
_wheel= new Animation();
_wheel.loadAnimation("wheeling.ani");
}
public function init():void{
this.addChild(_wheel);
_wheel.play();
}