# Help stopping jittering image

**URL:** https://forum.kirupa.com/t/help-stopping-jittering-image/260384
**Category:** flash
**Created:** [May 15, 2008, 1:08am UTC](https://forum.kirupa.com/t/help-stopping-jittering-image/260384 "2008-05-15T01:08:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Natushi12](https://avatars.discourse-cdn.com/v4/letter/n/ba8739/32.png) [@Natushi12](https://forum.kirupa.com/u/Natushi12)
#### Post date: [May 15, 2008, 1:08am UTC](https://forum.kirupa.com/t/help-stopping-jittering-image/260384/1 "2008-05-15T01:08:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![cooldude88](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@cooldude88](https://forum.kirupa.com/u/cooldude88)
#### Post date: [May 15, 2008, 3:03am UTC](https://forum.kirupa.com/t/help-stopping-jittering-image/260384/2 "2008-05-15T03:03:53Z")

</div>

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.
