# onMouseMove? why won't it work?

**URL:** <https://forum.kirupa.com/t/onmousemove-why-wont-it-work/94488>\
**Category:** Uncategorized\
**Created:** [November 13, 2003, 3:30am UTC](https://forum.kirupa.com/t/onmousemove-why-wont-it-work/94488 "2003-11-13T03:30:30Z")\
**Posts on this page:** 1\
**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/94488/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”);
