Stopping graphic movement in actionscript (flash MX)

Hi,

I’m having trouble making a scrolling “portfolio” for a website.

Basically, when the mouse is over the left arrow, it moves right & visa versa. The problem i’m having is that I can’t stop it when the mouse leaves the arrow, and it just continues moving.

It’s a graphic thats moving left & right with a mask over the top.

Hopefully that made sense - my code is below.

Thanks!

//identitiy is the image moving
function left(){
movement=10;
position = 10+movement;
identity._x = identity._x + movement;
}
function right(){
movement=10;
position = 10+movement;
identity._x = identity._x-movement;
}

function goleft(){
identity.onEnterFrame = left;

}
function goright(){
identity.onEnterFrame= right;
}
//this is where i’d put the method for it to stop moving…
function s(){
identity.stop();
}

movement_mc.onRollOver= s;
left_mc.onRollOver = goleft;
left_mc.onRollOut = s;
right_mc.onRollOut = s;
right_mc.onRollOver = goright;