# Movieclip focus not working on if statement

**URL:** <https://forum.kirupa.com/t/movieclip-focus-not-working-on-if-statement/311454>\
**Category:** flash\
**Created:** [July 7, 2010, 12:26am UTC](https://forum.kirupa.com/t/movieclip-focus-not-working-on-if-statement/311454 "2010-07-07T00:26:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zenor](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zenor/32/3634_2.png) [@Zenor](https://forum.kirupa.com/u/Zenor)\
**Post date:** [July 7, 2010, 12:26am UTC](https://forum.kirupa.com/t/movieclip-focus-not-working-on-if-statement/311454/1 "2010-07-07T00:26:59Z")

</div>

Hello,

I have created menu which has roll over and out animations.  
What I am trying to achieve is to play the roll over animation when rolling over the menu, but stop the roll out animation IF the focus has been set on a specific movieclip.

Here’s my code:

```auto
function menuOut(e:MouseEvent):void
    {
        stage.focus == contentMc;
            [COLOR=Red]if(stage.focus == contentMc)[/COLOR]{
                menuMc.stop();
                contentMc.stop();
                
            }
            else{
                menuMc.gotoAndPlay("out");
                contentMc.gotoAndPlay("out");
            }
    }

```

I am not sure what I am doing wrong, but if I trace the stage focus inside the if statement nothing happens, but it works if I trace it on else statement(gives null) which means that the if statement is bypassed and the else is played.

Any suggestions?
