# Nested mc in button loops instead of stopping

**URL:** <https://forum.kirupa.com/t/nested-mc-in-button-loops-instead-of-stopping/272088>\
**Category:** Uncategorized\
**Created:** [October 1, 2008, 10:40pm UTC](https://forum.kirupa.com/t/nested-mc-in-button-loops-instead-of-stopping/272088 "2008-10-01T22:40:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jodi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jodi/32/914_2.png) [@jodi](https://forum.kirupa.com/u/jodi)\
**Post date:** [October 1, 2008, 10:40pm UTC](https://forum.kirupa.com/t/nested-mc-in-button-loops-instead-of-stopping/272088/1 "2008-10-01T22:40:17Z")

</div>

hello, all

i am trying to do something that seems ridiculously simple, however, i am stumped and would appreciate any help

i have attached the working fla; it contains only a button called ‘team\_bu’ and the code, as follows:

import flash.display._;  
import flash.events._;  
import flash.text.\*;

team\_bu.addEventListener(MouseEvent.MOUSE\_OVER, onMouseOver);  
team\_bu.addEventListener(MouseEvent.MOUSE\_OUT, onMouseOut);

team\_bu.buttonMode = true;

function onMouseOver(event:MouseEvent):void  
{  
trace(“over”);  
team\_bu.gotoAndStop(“over”);  
}

function onMouseOut(event:MouseEvent):void  
{  
trace(“out”);  
team\_bu.gotoAndStop(“up”);  
}

on rollover, the bu moves to ‘over’ and stops, but the nest mc animation (the red band) keeps looping, and my trace is displaying ‘over’ ‘out’ endlessly, even while i keep my mouse over the button

thanks in advance!

j
