# Mouse coordinates

**URL:** <https://forum.kirupa.com/t/mouse-coordinates/16516>\
**Category:** Uncategorized\
**Created:** [March 25, 2003, 8:20pm UTC](https://forum.kirupa.com/t/mouse-coordinates/16516 "2003-03-25T20:20:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)\
**Post date:** [March 25, 2003, 8:20pm UTC](https://forum.kirupa.com/t/mouse-coordinates/16516/1 "2003-03-25T20:20:35Z")

</div>

why doesn’t this work

```php

onClipEvent (enterFrame) {
_root.xval.text = _root._xmouse;
_root.yval.text = _root._ymouse;
}

```

it’s attatched to a blank mc on the main stage.  
there are two dynamic text boxes that have var names of xval and yval … i thought this would work … apparently i’ve missed something 🙂

thanks

---

<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:** [March 25, 2003, 8:28pm UTC](https://forum.kirupa.com/t/mouse-coordinates/16516/2 "2003-03-25T20:28:33Z")

</div>

```php

onClipEvent (enterFrame) {
_root.val.text = _root._xmouse+","+_root._ymouse;
}

```

not sure why putting it all in one text box made it work

before it was checking the variable once and then not anymore but now that it is all in one text box it checks on enterFrame like it’s supposed to =)

---

<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:** [March 25, 2003, 8:43pm UTC](https://forum.kirupa.com/t/mouse-coordinates/16516/3 "2003-03-25T20:43:10Z")

</div>

strange, if you understand why keep posting !! :beam:

---

<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:** [March 25, 2003, 8:53pm UTC](https://forum.kirupa.com/t/mouse-coordinates/16516/4 "2003-03-25T20:53:11Z")

</div>

so people wouldn’t waste their time responding and just incase anyone else had a similar problem in the future.

::to anyone who cares::  
i’ve been experimenting with drawing lines in actionscript etc. and here’s what i came up with in my lil mouse coordinates experiment

enjoy=)
