# Object flickers on mouse over & out?

**URL:** <https://forum.kirupa.com/t/object-flickers-on-mouse-over-out/269456>\
**Category:** flash\
**Created:** [August 27, 2008, 9:58pm UTC](https://forum.kirupa.com/t/object-flickers-on-mouse-over-out/269456 "2008-08-27T21:58:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [August 27, 2008, 9:58pm UTC](https://forum.kirupa.com/t/object-flickers-on-mouse-over-out/269456/1 "2008-08-27T21:58:13Z")

</div>

```auto
btn0.addEventListener(MouseEvent.MOUSE_OVER, moveHoverOver);
btn0.addEventListener(MouseEvent.MOUSE_OUT, moveHoverOut);

private function moveHoverOver(event:MouseEvent):void
{
			
    trace("MOUSE IS OVER");
	this.buttonMode = true;
	btnHover.x = event.currentTarget.x;
	btnHover.y = event.currentTarget.y;
			
}
		
private function moveHoverOut(event:MouseEvent):void
{
			
    trace("MOUSE IS OUT");
	btnHover.x = -500;
	btnHover.y = -500;
			
}

```

It traces both MOUSE IS OVER & MOUSE IS OUT (constantly, btw) when you roll over or roll out. What gives?

All Im trying to do is bring a little box (btnHover) over each button when they roll over and take it off when they roll out. If I change event.currentTarget.x; to a number, the flickering stops.
