Mouse updating, Please Help

I’m doing an assignment where I need to have a ball move to the side of the screen that the mouse is on. However, I’ve gotten stuck, when the mouse stops moving the ball stops moving. I think it’s because the listener isn’t being activated, so i’ve tried adding another listener for ENTER_FRAME, but I can’t get it to work. I’ve looked around and I can’t find a solution, any help would be awesome. I’ve commented out the ENTER_FRAME listener stuff to make it work.

var ball:Ball = new Ball();
var updateMouseX:Number;
var updateMouseY:Number;
var moving:Boolean = true;
stage.addChild(ball);
ball.x = 0;
ball.y = 200;

//stage.addEventListener(Event.ENTER_FRAME, enterframe);

stage.addEventListener(MouseEvent.MOUSE_MOVE, mousePos);

//addEventListener(Event.ENTER_FRAME,myfunction);

/function myFunction(event:Event){
mousePos(event:MouseEvent);
}
/

function mousePos(event:MouseEvent){
updateMouseX = event.localX;
updateMouseY = event.localY;
ballmove(updateMouseX, updateMouseY);
}

function ballmove(updateMouseX, updateMouseY){
if(updateMouseX >= 400 && ball.x < 600){
ball.x += 5 ;
}
if(updateMouseX <= 200 && ball.x > 0){
ball.x -= 5 ;
}
if(updateMouseY >= 400 && ball.y < 600){
ball.y += 5 ;
}
if(updateMouseY <= 200 && ball.y > 0){
ball.y -= 5 ;
}
}