2Sva
попробуй использовать для своей задачи такую модель:

Код:
var _playerMovieStep: Number = 8;
var _leftCollisionStage: Number = player._width/2;
var _rightCollisionStage: Number = Stage.width-(player._width/2);
player.stop();
playerMovePlay = new Object();
playerMovePlay.onKeyDown = function()
{
if (Key.getCode() == Key.RIGHT)
{
player.onEnterFrame = function()
{
if (player._x < _rightCollisionStage)
{
this._x += _playerMovieStep;
}
this._xscale = 100;
this.gotoAndStop(2);
};
}
if (Key.getCode() == Key.LEFT)
{
player.onEnterFrame = function()
{
if (player._x > _leftCollisionStage)
{
this._x -= _playerMovieStep;
}
this._xscale = -100;
this.gotoAndStop(2);
};
}
if (Key.getCode() == Key.DOWN)
{
player.onEnterFrame = function()
{
if (this.crouch._currentframe > 16)
{
this.crouch.gotoAndPlay(4);
}
this.gotoAndStop(3);
};
}
if (Key.getCode() == 65)
{
player.onEnterFrame = function()
{
this.gotoAndStop(4);
};
}
if (Key.getCode() == 83)
{
player.onEnterFrame = function()
{
this.gotoAndStop(5);
};
}
};
Key.addListener(playerMovePlay);
playerMoveStop = new Object();
playerMoveStop.onKeyUp = function()
{
player.gotoAndStop(1);
delete player.onEnterFrame;
};
Key.addListener(playerMoveStop);
клавиши "A" и "S" удары