0
我的目標是在我的舞臺中加載多個(動畫)對象作爲動畫片段製作數組。數組作爲「movieclip」動作3.0
我當前的代碼:
var vijand:Array;
vijand = new Array ;
vijand.push(new Vijand(-580,-200));
vijand.push(new Vijand(-500,-200));
vijand.push(new Vijand(-420,-200));
for (var n:int = 0; n < vijand.length; n++)
{
this.addChild(vijand[n]);
}
//not working part. They do load on my stage. But I cant control the animation within the file(its a .SWF file I load)
for (var n:int = 0; n < vijand; n++){
gotoAndStop(1)
}
所以基本上我的問題是如何獲得這些「(1)gotoAndStop」和或「gotoAndStop(2)」,等等等等做動畫與。
編輯:外部文件加載它,在代碼
public function Vijand(positieX:int, positieY:int)
{
vijand = new Loader();
vijand.load(new URLRequest("resources/vijand.swf"))
this.addChild(vijand);
vijand.x = positieX;
vijand.y = positieY;
}
的問題是,加載的.swf文件是不是一個影片剪輯,所以我無法控制它。 – PlayerX
請看更新的答案... – strah
謝謝。得到它的工作! – PlayerX