# Mouse tracker

**URL:** https://forum.kirupa.com/t/mouse-tracker/27024
**Category:** Uncategorized
**Created:** [July 29, 2003, 3:13pm UTC](https://forum.kirupa.com/t/mouse-tracker/27024 "2003-07-29T15:13:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hiatus](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hiatus](https://forum.kirupa.com/u/hiatus)
#### Post date: [July 29, 2003, 3:13pm UTC](https://forum.kirupa.com/t/mouse-tracker/27024/1 "2003-07-29T15:13:05Z")

</div>

well i’m not that good at FMX AS cos i just started with it and i haf a problem:

I can create a double axis cursor and i want to have a tracker to trace the \_x and \_y values of my cursor but i’m not sure of the script…i only have a rough pseudo script in my mind, anyone help me out here?

---

<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 29, 2003, 3:18pm UTC](https://forum.kirupa.com/t/mouse-tracker/27024/2 "2003-07-29T15:18:44Z")

</div>

hmm… well the wy the script looks really depends on how you want your mouse tracker to move, try this to kick off with:

(say your mouse tracker is a movie clip on the \_root timeline called ‘Tracker’)  
put this code (FMX) in the frame where your tracker clip is placed:

```auto

Tracker.onEnterFrame = function() {
          Tracker._x += (_xmouse - _x) / 10;
          Tracker._y += (_ymouse - _y) / 10;
}

```

hope this is something like what you are after 😉 😛

---

<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 29, 2003, 3:19pm UTC](https://forum.kirupa.com/t/mouse-tracker/27024/3 "2003-07-29T15:19:40Z")

</div>

this might help you out.

on the first frame of your movie insert this code:

```auto
onEnterFrame = function () {
trace("X: "+_root._xmouse+" Y: "+_root._ymouse);
};

```
