
Код AS1/AS2:
mc.onEnterFrame = function():Void {
if (Key.isDown(Key.UP)) {
this._y -= 2;
}
if (Key.isDown(Key.DOWN)) {
this._y += 2;
}
if (Key.isDown(Key.RIGHT)) {
this._x += 2;
}
if (Key.isDown(Key.LEFT)) {
this._x -= 2;
}
}
Ненавижу switch, так что написал в if'е