Create a movieclip, and then enter this in its coding:
onClipEvent(load){
moveSpeed=3;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x+=moveSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._x-=moveSpeed;
}
if (Key.isDown(Key.DOWN)) {
this._y+=moveSpeed;
} else if (Key.isDown(Key.UP)) {
this._y-=moveSpeed;
}
}
3 as a move speed is fairly slow, feel free to change it. Also, this will not change the direction the movieclip is facing. If you want to change the way it faces for moving left and right (the movieclip should be facing right) you add this after onClipEvent(load){
xscale = _xscale;
And then after this._x+=moveSpeed (and this._x-=moveSpeed):