# If(stop on MouseOver) help!

**URL:** https://forum.kirupa.com/t/if-stop-on-mouseover-help/315155
**Category:** Uncategorized
**Created:** [October 19, 2010, 5:19am UTC](https://forum.kirupa.com/t/if-stop-on-mouseover-help/315155 "2010-10-19T05:19:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![wrzdzn](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wrzdzn](https://forum.kirupa.com/u/wrzdzn)
#### Post date: [October 19, 2010, 5:19am UTC](https://forum.kirupa.com/t/if-stop-on-mouseover-help/315155/1 "2010-10-19T05:19:43Z")

</div>

how would I make my rotating earth stop on mouse over.  
I thought the easiest way is to remove the event listener.  
I know my code does not make sense but it I think it is close.  
Can anyone help with the logic?  
the if statement line is where I think I am wrong…

here is my code.  
any help? thx.

function mouseOver (event:MouseEvent):void {  
var mOver = event.target.name  
\*\* if (mOver == earth\_mc.MOUSE\_OVER):void{\*\*  
earth\_mc.removeEventListener(Event.ENTER\_FRAME,moveEarth);

}
