# Inverted Mouse Follow

**URL:** <https://forum.kirupa.com/t/inverted-mouse-follow/211913>\
**Category:** Uncategorized\
**Created:** [January 6, 2007, 10:55am UTC](https://forum.kirupa.com/t/inverted-mouse-follow/211913 "2007-01-06T10:55:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [January 6, 2007, 10:55am UTC](https://forum.kirupa.com/t/inverted-mouse-follow/211913/1 "2007-01-06T10:55:14Z")

</div>

Hi there,

How would I ‘invert’ the “mouse follow with easing” code bellow - So that my mouse follow is mirrored? ie: when the mouse is at the bottom x=10 y=-50, the MC is at placement is x=-10 y=50 (thus the top) .

I am trying to create a moving camera presence with a subtle lighting fx, that reacts to mouse placement.

onClipEvent (load) {  
\_x = 0;  
\_y = 0;  
speed = 5;  
}  
onClipEvent (enterFrame) {  
endX = \_root.\_xmouse;  
endY = \_root.\_ymouse;  
\_x += (endX-\_x)/speed;  
\_y += (endY-\_y)/speed;  
}

Help anyone ? This should be easy stuff - I just havent made it there yet!

Thanks!!!:pirate3:
