1 Reply Latest reply on Jan 25, 2007 9:16 AM by crazyjoemilan

    Following the Cursor

    Big_Martin
      I have a character who sits at the bottom left of a movie and I want to make her eyes follow the cursor. I've tried "startDrag" but it isn't really comprehensive enough. I want her to look straight ahead and then when the cursor moves she will look at it and then return to looking straight ahead, preferably with some damping on her movement. Also as the cursor moves to the right, say, she will look further right rather than just fully right in one movement.

      Is any of this possible? If so I would really appreciate some help in getting her to work.

      Thanks in advance!
        • 1. Re: Following the Cursor
          crazyjoemilan Level 2
          hooray for math!

          You can pull _xmouse and _ymouse as variables, and run a loop that moves the eyes depending on where the mouse is. After the mouse is still (or moves only a little bit) for 5 seconds, you could just use the tween class to run it back. You could even make the eyes bobble!!

          Go check out Kirupa.com 's tutorial about the Tween class, and motion. Its very easy, but you'll need to import it on frame one. Read through the whole tutorial first. Then, see if you can't tie it to _xmouse and _ymouse.

          merry _xmouse! haha, I feel loopy.

          HH