# onMouseMove? why won't it work?

**URL:** <https://forum.kirupa.com/t/onmousemove-why-wont-it-work/35366>\
**Category:** flash\
**Created:** [November 13, 2003, 3:30am UTC](https://forum.kirupa.com/t/onmousemove-why-wont-it-work/35366 "2003-11-13T03:30:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mariam](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@mariam](https://forum.kirupa.com/u/mariam)\
**Post date:** [November 13, 2003, 3:30am UTC](https://forum.kirupa.com/t/onmousemove-why-wont-it-work/35366/1 "2003-11-13T03:30:30Z")

</div>

help! I am using the onMouseMove command inside a small movie. It works fine. this is it below.

animation.onMouseMove = function(){  
mousedist=\_xmouse-oldXmouse;  
oldXmouse=\_xmouse;  
//speed = 5  
if(mousedist\>0)\_level0.animation.nextFrame();  
if(mousedist\<0)\_level0.animation.prevFrame();  
};

BUT when I load the .swf into a bigger .swf movie with loadmovie command it doesn’t work anymore. that is, the animation doesn’t move when the mouse moves.  
any ideas why?  
below is loadMovie command.

wave\_btn.onRelease = function() {  
\_root.generic\_mc.\_x = 0;  
\_root.generic\_mc.loadMovie(“emwaves.swf”);

---

<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:** [November 13, 2003, 4:21am UTC](https://forum.kirupa.com/t/onmousemove-why-wont-it-work/35366/2 "2003-11-13T04:21:02Z")

</div>

\_level10 is the default level when you load stuff in, use that instead of \_level0

---

<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:** [November 13, 2003, 5:17am UTC](https://forum.kirupa.com/t/onmousemove-why-wont-it-work/35366/3 "2003-11-13T05:17:30Z")

</div>

thanx yeldarb, but it didn’t work.  
Did i mention I’m loading the external swf into an empty movie clip? does this matter?  
any other ideas?  
m

---

<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:** [November 13, 2003, 8:52am UTC](https://forum.kirupa.com/t/onmousemove-why-wont-it-work/35366/4 "2003-11-13T08:52:14Z")

</div>

thanx yeldarb. problem solved. I got rid of the \_level altogether.  
m
