# Mouse Follow that does not start at (0,0)

**URL:** https://forum.kirupa.com/t/mouse-follow-that-does-not-start-at-0-0/116823
**Category:** Uncategorized
**Created:** [July 21, 2004, 6:09pm UTC](https://forum.kirupa.com/t/mouse-follow-that-does-not-start-at-0-0/116823 "2004-07-21T18:09:34Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![D1gTaL\_K0z](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@D1gTaL\_K0z](https://forum.kirupa.com/u/D1gTaL_K0z)
#### Post date: [July 21, 2004, 6:09pm UTC](https://forum.kirupa.com/t/mouse-follow-that-does-not-start-at-0-0/116823/1 "2004-07-21T18:09:34Z")

</div>

Based on the tutorial…

[Mouse Follow with Easing](http://www.kirupa.com/developer/mx/followease.htm)

[color=black][font=Arial]I created this [menu\_follow.swf](http://avtmx.com/upload/files/menu_follow.swf)[/font][/color]

[font=‘Times New Roman’][font=Verdana][size=2]I’m using. [/size][/font][/font]  
[font=‘Times New Roman’][font=Verdana][size=2]

```auto
 [/size][/font]
[font='Times New Roman'][/font] 
onClipEvent (load) {

			_x = 406;

			speed = 5;

}

onClipEvent (enterFrame) {

			endX = _root._xmouse;

			_x += (endX-_x)/speed;

}

```

When it loads and your mouse in not over the flash, it will start at x=406, but it quickly runs back to 0.

I want each item to be red depending on the page loaded. Is there a way that it can load in a certain position, then have it follow the mouse?

[Link to the .fla file](http://avtmx.com/upload/files/menu_follow.fla)[/font]

---

<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: [July 22, 2004, 7:03pm UTC](https://forum.kirupa.com/t/mouse-follow-that-does-not-start-at-0-0/116823/2 "2004-07-22T19:03:39Z")

</div>

erm… change the \_x = 406 bit??? or have i misunderstood your question??

Prophet.

---

<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: [July 22, 2004, 7:16pm UTC](https://forum.kirupa.com/t/mouse-follow-that-does-not-start-at-0-0/116823/3 "2004-07-22T19:16:10Z")

</div>

change your fps to 30

:p:

---

<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: [July 23, 2004, 6:05am UTC](https://forum.kirupa.com/t/mouse-follow-that-does-not-start-at-0-0/116823/4 "2004-07-23T06:05:59Z")

</div>

ok. i fixed it by setting up a variable to determine whether the menu’s been rolled over yet. i gave redbox an instance name. it shouldn’t be too hard to understand w/the comments. look at the AS in the buttons and the redbox MC.

---

<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: [July 23, 2004, 7:59pm UTC](https://forum.kirupa.com/t/mouse-follow-that-does-not-start-at-0-0/116823/5 "2004-07-23T19:59:47Z")

</div>

OMG!!!  
Dude you are great. Thank you very much for this.  
This is something that should be added to the tutorial.

---

<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: [July 24, 2004, 2:51am UTC](https://forum.kirupa.com/t/mouse-follow-that-does-not-start-at-0-0/116823/6 "2004-07-24T02:51:46Z")

</div>

no problem. welcome to the forums by the way.

---

<div class="post-metadata">

### Author: ![webrookie](https://avatars.discourse-cdn.com/v4/letter/w/3d9bf3/32.png) [@webrookie](https://forum.kirupa.com/u/webrookie)
#### Post date: [August 23, 2004, 1:48am UTC](https://forum.kirupa.com/t/mouse-follow-that-does-not-start-at-0-0/116823/7 "2004-08-23T01:48:36Z")

</div>

Hello All,

I am new to this site and its a really cool and informative site.  
When I download any .fla file, like the one above. I get an “unexpected file format” error, when trying to open it.  
Can some one please tell me what I am doing wrong?  
I am using FLASH MX2004 professional.  
Thanks in advance!
