# Mouse\_out event

**URL:** <https://forum.kirupa.com/t/mouse-out-event/297966>\
**Category:** flash\
**Created:** [October 11, 2009, 1:03pm UTC](https://forum.kirupa.com/t/mouse-out-event/297966 "2009-10-11T13:03:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theofiel](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@Theofiel](https://forum.kirupa.com/u/Theofiel)\
**Post date:** [October 11, 2009, 1:03pm UTC](https://forum.kirupa.com/t/mouse-out-event/297966/1 "2009-10-11T13:03:12Z")

</div>

Hi all,

I have a tab with the text menu and when you roll over the tab the menu slides out, on roll out the menu waits (timer function) and then slides back. But when I add a button inside the menu (child of menu) then the button will trigger the Mouse out event. Like the earlier post today about the hit test, I understand that the button will trigger the Mouse\_out event. Is there a way to add a button but do not trigger the mouse out event, or is there an alternative for slide the menu back?

my code (just starting to learn (hope it is clean :ko:))

```auto
import caurina.transitions.*;
import flash.utils.*;

function menuTimer(evt:MouseEvent):void
{
    var myTimer:Timer = new Timer(500,1);
    myTimer.addEventListener(TimerEvent.TIMER, menuIn);
    myTimer.start();
}

function menuOut(evt:MouseEvent):void
{
Tweener.addTween(menu, {x:0,
                         y:79,
                        time:1,
                        transition:"easeOutBounce"});
}

function menuIn(evt:TimerEvent):void
{
Tweener.addTween(menu, {x:-74,
                         y:79,
                        time:1,
                        transition:"easeOutBounce"}
                        );
}

menu.addEventListener(MouseEvent.MOUSE_OVER, menuOut);
menu.addEventListener(MouseEvent.MOUSE_OUT, menuTimer);

```
