キーを押してアニメーションを変更し、ループして実行をシミュレートしようとしています。gotoAndPlay(9)
ただし、アニメーションのフレームに関係なく、トリガーに固執します。
onClipEvent(keyDown)
{
if (Key.isDown(Key.RIGHT))
{
this._x += 5;
if (this.currentFrame <= 9)
{
if (this.currentFrame <= 8)
{
gotoAndPlay(9);
}
else
{
//nothing
}
}
}