# Offset my working mouse follower

**URL:** <https://forum.kirupa.com/t/offset-my-working-mouse-follower/10396>\
**Category:** Uncategorized\
**Created:** [December 31, 2002, 6:24am UTC](https://forum.kirupa.com/t/offset-my-working-mouse-follower/10396 "2002-12-31T06:24:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lineus](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@lineus](https://forum.kirupa.com/u/lineus)\
**Post date:** [December 31, 2002, 6:24am UTC](https://forum.kirupa.com/t/offset-my-working-mouse-follower/10396/1 "2002-12-31T06:24:50Z")

</div>

as you can see this is my first post, thank you in advance for your time and assistance.

I have succesfully achieved a mouse follower using the following code,

onClipEvent(load){  
physics = 0.15;  
}

onClipEvent(enterFrame){  
\_x += (\_root.\_xmouse-\_x)\*physics;  
\_y += (\_root.\_ymouse-\_y)\*physics;  
}

the part I need to understand how to change is:

I want to offset the MC in relation to the mouse pointer,  
probably by assigning variables, not sure though.

thanks again for your help.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 31, 2002, 9:30am UTC](https://forum.kirupa.com/t/offset-my-working-mouse-follower/10396/2 "2002-12-31T09:30:55Z")

</div>

Lineus-  
What do you mean offset the MC in realtion to the mouse? As in make it go slower? Ormaybe move like elasticity? Maybe if you could expplain a little bit more of what you wnat, I’ll try to help you out as best I can.

-brad-:evil:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 31, 2002, 11:18am UTC](https://forum.kirupa.com/t/offset-my-working-mouse-follower/10396/3 "2002-12-31T11:18:02Z")

</div>

onClipEvent(enterFrame){  
\_x += (\_root.\_xmouse+xoffset-\_x)\*physics;  
\_y += (\_root.\_ymouse+yoffset-\_y)\*physics;  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 31, 2002, 4:14pm UTC](https://forum.kirupa.com/t/offset-my-working-mouse-follower/10396/4 "2002-12-31T16:14:44Z")

</div>

Problem solved.

I did have to define the variables in the onClipEvent(load)

but once that was done, I was able to adjust the MC.

to reply to bcogswell11:  
what I wanted to have happen was have the movie clip that was following my mouse not stop directly under the tip of the mouse  
but off to one side and under

thanks to you Both for breaking me in gently
