# TweenLite Reverse Mouse Follower

**URL:** <https://forum.kirupa.com/t/tweenlite-reverse-mouse-follower/319933>\
**Category:** flash\
**Created:** [March 9, 2011, 9:47am UTC](https://forum.kirupa.com/t/tweenlite-reverse-mouse-follower/319933 "2011-03-09T09:47:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctaminian](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@ctaminian](https://forum.kirupa.com/u/ctaminian)\
**Post date:** [March 9, 2011, 9:47am UTC](https://forum.kirupa.com/t/tweenlite-reverse-mouse-follower/319933/1 "2011-03-09T09:47:06Z")

</div>

Hey guys,

I’m trying to reverse the direction of my mouse follower which I tween using TweenLite…

I have an image bigger than the stage, when it first loads, I define a starting point, then on enter frame I keep defining points according to the mouse position, and then I tween to the difference…

The question is how can I reverse this action, so that when I move the mouse to the right, the image goes to the left instead of following the mouse to the right???

Here is the code I use…

```php

var finalDX; 
var finalDY; 
var mouseLocFirstTime:Point = new Point(mc2._xmouse, mc2._ymouse); 

mc2.onEnterFrame = function() 
{ 
    mc2.onMouseMove = function() 
    { 
        var destination:Point = new Point(mc2._xmouse,mc2._ymouse); 
        finalDX = destination.x - mouseLocFirstTime.x; 
        finalDY = destination.y - mouseLocFirstTime.y; 
        TweenLite.to(mc2,2,{_x:mc2._x + finalDX, _y:mc2._y + finalDY}); 
    }; 
} 

```

mc2 is the name of my image movie clip…the image inside the movie is aligned top left…

Any help would be greatly appreciated guys!!!
