Why won't my character move with the arrow keys in Actionscript 3?

**[SIZE=2][/SIZE] **

My character’s name is character. When left and right are pressed it tells me what’s being pressed when I run it - it says there’s no errors with the code. My character doesn’t do anything though! This is the code i used:

//defining variables
var leftKeyDown:Boolean = false;
var rightKeyDown:Boolean = false;
var xspeed:Number = 10
//checks if keys is being pressed
function checkKeys(event:KeyboardEvent) {
if (event.keyCode == 39) {
trace(“Right key is down”);
rightKeyDown = true;
}
if (event.keyCode == 37) {
trace(“Left key is down”);
leftKeyDown = true;
}
}
//checks if keys is being released
function keyUps(event:KeyboardEvent) {
if (event.keyCode == 39) {
event.keyCode = 0;
rightKeyDown=false;
trace(“Right key is NOT down”);
}
if (event.keyCode == 37) {
event.keyCode = 0;
leftKeyDown=false;
trace(“Left key is NOT down”);
}
}
//chracters movement
function movement(Event){
if (rightKeyDown == true) {
character.x += xspeed;
}
if (rightKeyDown == true) {
character.x -= xspeed;
}
}
//add listeners
stage.addEventListener(Event.ENTER_FRA… movement);
stage.addEventListener(KeyboardEvent.K… , checkKeys);
stage.addEventListener(KeyboardEvent.K… keyUps);

The character is a movie clip, it has the right instance name so I dont know what’s wrong.

The actions are on one layer and the character is on another if this helps.