Flash 父动画完成后,停止父动画中的子movieclip中的动画

Flash 父动画完成后,停止父动画中的子movieclip中的动画,flash,actionscript,actionscript-2,flash-cs5,tween,Flash,Actionscript,Actionscript 2,Flash Cs5,Tween,我有一个羊的movieclip符号(符号名:“羊”)。这将在屏幕上显示动画。在这部绵羊电影里,它的两条腿上下摆动。当羊停止移动时,我希望腿也停止动画 我尝试从移动功能的内部进入腿部: function sheepMove6() { var sheepMoveX6:Tween = new Tween (inst_sheep, "_x", Strong.easeOut, 900, 850, 10, false); sheepMoveX6.onMotionFinished = fun

我有一个羊的movieclip符号(符号名:“羊”)。这将在屏幕上显示动画。在这部绵羊电影里,它的两条腿上下摆动。当羊停止移动时,我希望腿也停止动画

我尝试从移动功能的内部进入腿部:

function sheepMove6() {
    var sheepMoveX6:Tween = new Tween (inst_sheep, "_x", Strong.easeOut, 900, 850, 10, false);

    sheepMoveX6.onMotionFinished = function() {
        sheep.leg1MoveY.stop();
    }
}
我还尝试从sheep电影剪辑中检测动画结束:

_root.sheepMoveX6.onMotionFinished = function() {
    leg1MoveY.stop();
}
一旦羊到达目的地,这两种方法似乎都不能阻止它们的腿移动。我用的是AS2

--编辑--

由于不知道如何定位儿童电影剪辑,我尝试了几种不同的方法来访问它,但都没有成功。注:leg1MoveY是tween变量的名称

_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();

我不太清楚你电影的结构,但我怀疑你只是在
inst_leg1
的函数中声明
leg1MoveY
。如果是这样,
leg1MoveY
只能从该函数内部访问(其“范围”仅限于该函数)。在函数之外声明它(我猜测leg1的作用):

那么您尝试的第一行应该可以工作:

inst_sheep.inst_leg1.leg1MoveY.stop();
这里有一篇关于这方面的文章可能会有所帮助

inst_sheep.inst_leg1.leg1MoveY.stop();