# TweenLite help

**URL:** <https://forum.kirupa.com/t/tweenlite-help/265546>\
**Category:** flash\
**Created:** [July 10, 2008, 4:09am UTC](https://forum.kirupa.com/t/tweenlite-help/265546 "2008-07-10T04:09:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jenna\_Launch](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@Jenna\_Launch](https://forum.kirupa.com/u/Jenna_Launch)\
**Post date:** [July 10, 2008, 4:09am UTC](https://forum.kirupa.com/t/tweenlite-help/265546/1 "2008-07-10T04:09:26Z")

</div>

Hi there!

I am new to AS3 and just getting to know TweenLite. I am trying to implement TweenLite into my script (below) to make the mouse follow alot smoother, can anyone point me in the right direction?

I appreciate your help in advance!

* * *

```auto

import scripts.TweenLite;

//This is the code for the invisible buttons which instigates the tooltip appearing and dissapearing
click_btn1.addEventListener(MouseEvent.MOUSE_OVER, click_btn1_over);
click_btn1.addEventListener(MouseEvent.MOUSE_OUT, click_btn1_out);
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
//contentmc.tooltip01_mc.addEventListener(Event.ENTER_FRAME, click_btn1_on);

function click_btn1_over(m:MouseEvent):void {
    tooltip01_mc.gotoAndPlay(2);
}
function click_btn1_out(m:MouseEvent):void {
    tooltip01_mc.gotoAndPlay(12);
}

function mouseMove(event:MouseEvent){
 var yMouse = tooltip01_mc.parent.mouseY;
    var max = 0;
    if(tooltip01_mc.parent.mouseY<0)
    { tooltip01_mc.y -= (tooltip01_mc.y-max) / 8;}
    else {

    if(Math.abs(yMouse - tooltip01_mc.y) < 1) {
        tooltip01_mc.y = yMouse;
    } else {
        tooltip01_mc.y -= (tooltip01_mc.y-yMouse) / 8;
    }
    
    var xMouse = tooltip01_mc.parent.mouseX;
    if(tooltip01_mc.parent.mouseX<0)
    { tooltip01_mc.x -= (tooltip01_mc.x-max) / 8;}
    else {

    if(Math.abs(xMouse - tooltip01_mc.x) < 1) {
        tooltip01_mc.x = xMouse;
    } else {
        tooltip01_mc.x -= (tooltip01_mc.x-xMouse) / 8;
    }
}
}
}

```

---

<div class="post-metadata">

**Author:** ![Jenna\_Launch](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@Jenna\_Launch](https://forum.kirupa.com/u/Jenna_Launch)\
**Post date:** [July 10, 2008, 8:05am UTC](https://forum.kirupa.com/t/tweenlite-help/265546/2 "2008-07-10T08:05:48Z")

</div>

no, no errors, the script works fine accept for the fact that when the movie clip chases the mouse it is really jerky. I have got the: import scripts.TweenLite; in there but im not actually calling it because im not sure how.

---

<div class="post-metadata">

**Author:** ![nortago](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nortago/32/1240_2.png) [@nortago](https://forum.kirupa.com/u/nortago)\
**Post date:** [July 10, 2008, 12:29pm UTC](https://forum.kirupa.com/t/tweenlite-help/265546/3 "2008-07-10T12:29:08Z")

</div>

Not sure why you’ve got import scripts.TweenLite; TweenLite should be kept in the original gs folder, so your import code should look like import gs.TweenLite; - That might help?

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 10, 2008, 1:42pm UTC](https://forum.kirupa.com/t/tweenlite-help/265546/4 "2008-07-10T13:42:04Z")

</div>

try something like this… I’m assuming your code was on the timeline, so this is as well. (I just put a clip called box on the stage);

```auto

import gs.TweenLite;
import fl.motion.easing.Quadratic;

this.stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMouse);

function moveMouse(e:MouseEvent):void {
	TweenLite.to(box, .25, {x:mouseX, y:mouseY, ease:Quadratic.easeOut});
};

```

---

<div class="post-metadata">

**Author:** ![Jenna\_Launch](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@Jenna\_Launch](https://forum.kirupa.com/u/Jenna_Launch)\
**Post date:** [July 14, 2008, 1:43am UTC](https://forum.kirupa.com/t/tweenlite-help/265546/5 "2008-07-14T01:43:43Z")

</div>

Sekasi - excellent, thank you so much!

---

<div class="post-metadata">

**Author:** ![Easyforpp](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@Easyforpp](https://forum.kirupa.com/u/Easyforpp)\
**Post date:** [July 14, 2008, 3:19pm UTC](https://forum.kirupa.com/t/tweenlite-help/265546/6 "2008-07-14T15:19:13Z")

</div>

Thanks! Bump!--------------------------------our wow gold site:buy [wow gold, cheap [url=http://www.wowgoldcc.cn/wowgoldworld.htm]wow gold, free [url=http://www.wowgoldcc.cn/Newplayers.htm]wow gold](http://www.wowgoldcc.cn),
