# OnMouseMove ONLY onRollOver

**URL:** <https://forum.kirupa.com/t/onmousemove-only-onrollover/254134>\
**Category:** Uncategorized\
**Created:** [March 8, 2008, 12:13pm UTC](https://forum.kirupa.com/t/onmousemove-only-onrollover/254134 "2008-03-08T12:13:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [March 8, 2008, 12:13pm UTC](https://forum.kirupa.com/t/onmousemove-only-onrollover/254134/1 "2008-03-08T12:13:13Z")

</div>

Hi there, I have a simple enough Q… I am trying to ignite an onMouseMove function with an onEnterFrame event ONLY when I rollOver a certain hotspot…  
Ok,Starting with:…

```auto
My_mc.onRollOver = function(){
var mouse:Object = new Object();
    Mouse.addListener(mouse);

    onMouseMove.mouse = onEnterFrame = function () { 
trace("OK");}
}

```

The trace fires on the rollOver… But when the mouse STOPS, Trace IS still Firing.  
Also I want to Kill the function, when I rollOut! … \>  
It should be nice and simple, but im having a few problems with general syntax of AS.

Could anyone give me a hand!?? Thanks:ch:
