# Mouse\_over and Mouse\_out loop problem

**URL:** https://forum.kirupa.com/t/mouse-over-and-mouse-out-loop-problem/328493
**Category:** flash
**Created:** [May 21, 2012, 11:35am UTC](https://forum.kirupa.com/t/mouse-over-and-mouse-out-loop-problem/328493 "2012-05-21T11:35:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![MFRS](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@MFRS](https://forum.kirupa.com/u/MFRS)
#### Post date: [May 21, 2012, 11:35am UTC](https://forum.kirupa.com/t/mouse-over-and-mouse-out-loop-problem/328493/1 "2012-05-21T11:35:26Z")

</div>

I have a button in my website that has both functions(MOUSE\_OVER and MOUSE\_OUT), and when i mouse\_over in the button it expands its size, but when i mouse\_out it’s supposed to change back to it’s original size, except it doens’t.

The code i have is:

```auto
aboutb.addEventListener(MouseEvent.MOUSE_OVER, about_anim);

function about_anim (e:MouseEvent) :void{
    aboutb.nextFrame(); //in the next frame is the expanding animation 
    
aboutb.addEventListener(MouseEvent.MOUSE_OUT, about_anim_out); // to add the mouse_out function

    }

function about_anim_out (e:MouseEvent) :void{
    aboutb.prevFrame();
}

```

Am i doing anything wrong?
