0
我有一隻綿羊的movieclip符號(符號名稱:「綿羊」)。這在整個屏幕上呈現出動畫效果。在羊電影剪輯裏面,有一些雙腿在上下移動。當羊停止移動時,我想腿也停止動畫。一旦父動畫完成,停止從父級到子級動畫片的動畫
我試圖從移動的函數內部訪問腿:
function sheepMove6() {
var sheepMoveX6:Tween = new Tween (inst_sheep, "_x", Strong.easeOut, 900, 850, 10, false);
sheepMoveX6.onMotionFinished = function() {
sheep.leg1MoveY.stop();
}
}
我也試着檢測動畫從羊影片剪輯中整理:
_root.sheepMoveX6.onMotionFinished = function() {
leg1MoveY.stop();
}
這些似乎都沒有阻止雙腿移動,一旦羊達到目的地。我正在使用AS2。
- 編輯 -
不知道如何定位影片剪輯我已經嘗試幾種不同的方式來訪問它的孩子,下面,還沒有工作。注:leg1MoveY爲補變量
_root.inst_sheep.inst_leg1.leg1MoveY.stop();
_root.inst_sheep.inst_leg1.stop();
_root.inst_sheep.stop();
_root.inst_sheep.inst_leg1.stop();
_root.inst_leg1.stop();
this.inst_sheep.inst_leg1.leg1MoveY.stop();
this.inst_sheep.inst_leg1.stop();
this.inst_sheep.stop();
this.inst_sheep.inst_leg1.stop();
this.inst_leg1.stop();
謝謝,文章非常有用 – Fisu 2013-02-14 09:03:14