我有一个羊的电影剪辑符号(符号名称:“羊”)。这会在屏幕上显示动画。在绵羊影片剪辑中,它的腿上下移动。当绵羊停止移动时,我希望腿也停止动画。
我试图从移动功能内部访问腿:
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();