# Mouse follow

**URL:** <https://forum.kirupa.com/t/mouse-follow/14319>\
**Category:** Uncategorized\
**Created:** [February 25, 2003, 1:14am UTC](https://forum.kirupa.com/t/mouse-follow/14319 "2003-02-25T01:14:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobody](https://avatars.discourse-cdn.com/v4/letter/n/94ad74/32.png) [@nobody](https://forum.kirupa.com/u/nobody)\
**Post date:** [February 25, 2003, 1:14am UTC](https://forum.kirupa.com/t/mouse-follow/14319/1 "2003-02-25T01:14:44Z")

</div>

in my never ending quest to completel every tutorial here at kirupa i stumbled upon probably a really easy to solve problem… but heres what it is  
i have one frame… and the code below is whats on the frame… the action isnt on any particular thing… i dont know if it should be… i just applied to to the frame  
also i have an x box and a y box… both dynamic text boxes labeled with the appropriate variables… i think… hmm any ideas as to why the values just stay at 0 the whole time?  
thanks in advance

```php
xval = _root._xmouse;
ycal = _root._ymouse;

```

---

<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:** [February 25, 2003, 1:16am UTC](https://forum.kirupa.com/t/mouse-follow/14319/2 "2003-02-25T01:16:05Z")

</div>

> ycal = \_root.\_ymouse;

its actually yval in the animation… sorry

---

<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:** [February 25, 2003, 1:49am UTC](https://forum.kirupa.com/t/mouse-follow/14319/3 "2003-02-25T01:49:02Z")

</div>

i really need help… pleaaaaaase  
i dont get what to apply the actionscript to… and does it need more than what i just posted and im lost…

---

<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:** [February 25, 2003, 1:59am UTC](https://forum.kirupa.com/t/mouse-follow/14319/4 "2003-02-25T01:59:41Z")

</div>

could u attach the zip?

---

<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:** [February 25, 2003, 2:02am UTC](https://forum.kirupa.com/t/mouse-follow/14319/5 "2003-02-25T02:02:47Z")

</div>

instead of applying it in frame1, put the script in a:  
onClipEvent (mouseMove) handler

---

<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:** [February 25, 2003, 2:15am UTC](https://forum.kirupa.com/t/mouse-follow/14319/6 "2003-02-25T02:15:51Z")

</div>

see if the attached fla is wat ur looking for, the script in the little white dot

---

<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:** [February 25, 2003, 2:35am UTC](https://forum.kirupa.com/t/mouse-follow/14319/7 "2003-02-25T02:35:38Z")

</div>

i think thats what im looking for but i cant find anything in that file… ill attatch mine…

---

<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:** [February 25, 2003, 3:11am UTC](https://forum.kirupa.com/t/mouse-follow/14319/8 "2003-02-25T03:11:07Z")

</div>

hey i “fixed” it, but u shouldnt follow it, cuz this is how things were done in flash 4

what was wrong with the original 1 i did, i’ll explain anything u cant follow

---

<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:** [February 25, 2003, 3:26pm UTC](https://forum.kirupa.com/t/mouse-follow/14319/9 "2003-02-25T15:26:12Z")

</div>

cool, thanks… now i have questions…  
first of all… where did u put the code to make it work? i cant find it  
secondly… what did u mean by the //this is useless stuff… did u mean my code was useless or your note was useless  
and also… when the x coordinate always has .95 on the end of the number… hmmmm… im slightly less confused now tho, 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:** [February 25, 2003, 3:32pm UTC](https://forum.kirupa.com/t/mouse-follow/14319/10 "2003-02-25T15:32:46Z")

</div>

oops… the .95 thing only happens when i view it in flash… but once i publish it its fine… but i still need to know where the code is…

---

<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:** [February 25, 2003, 4:19pm UTC](https://forum.kirupa.com/t/mouse-follow/14319/11 "2003-02-25T16:19:27Z")

</div>

hey… i went through yours and then tried to make my own without looking at yours… and i figured everything out… so u did a great job helping  
thanks so much for the help
