MC movement, rotation, and position

I’m having a problem with a little movement script I wrote for a MC I have.
I believe it either has to do with variable scoping, or with a coordinate system problem. (If I change the xPos and yPos in the onClipEvent (load) to 0,0…then the MC starts in the middle of the field (MC) I’m trying to move it inside of.)
Basically…the ActionScript you see below is a part of the “Player” MC…who is supposed to move around a “field” MC I have.

Any suggestions? (I was assuming setting xPos and yPos to 0 would have the Player MC starting at the very top left of the entire screen…which instead it starts in the middle of the “field” MC.) Also - When I press the different arrow keys…the Player MC jumps around to different locations…but once at the new location the movement (in a single direction) works okay.

I’ve attached the .swf in case someone wants to help me. :slight_smile:

onClipEvent (load) {
speed = 2;
xPos = 0;
yPos = 0;
this._x = xPos;
this._y = yPos;
onClipEvent (enterFrame) {
//First, move the character.
if (Key.isDown(Key.UP)) {
yPos -= speed;
this._rotation = 0;
if (Key.isDown(Key.DOWN)) {
yPos += speed;
this._rotation = 180;
if (Key.isDown(Key.RIGHT)) {
xPos += speed;
this._rotation = 90;
if (Key.isDown(Key.LEFT)) {
xPos -= speed;
this._rotation = 270;

this._x = xPos;
this._y = yPos;

//Here, do the hitTests.