Help stopping jittering image

Hey Everyone,

I’m currently having a problem with an image that changes direction depending on the mouse movement

Heres the code i’m using

onMouseMove = function() {
if(_root._xmouse>Stage.width/2)
{
fishy1._xscale *= -1;
}
else if(_root._xmouse<Stage.width/2)
{
fishy1._xscale *= 1;
}
else
{
// do nothing
}
}

The image seems to move fine when on the left hand side, yet when I cross over it starts to wildy turn back and forth and usually ends up facing the wrong way. Any suggestions on how to stop this happening?

Natushi12

id have to c an fla b4 i can really say but you could try using -100 and 100 instead of * 1 might be causing it not quite sure.