rendered paste bodyonClipEvent (load) {
moveSpeed = 15;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown(Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown(Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._x -= moveSpeed;
}
if (hitTest(_root.left_wall) == true) {
this._x += moveSpeed;
}
if (hitTest(_root.right_wall) == true) {
this._x -= moveSpeed;
}
if (hitTest(_root.top_wall) == true) {
this._y += moveSpeed;
}
if (hitTest(_root.bottom_wall) == true) {
this._y -= moveSpeed;
}
}