# Checking multiple variables

**URL:** <https://forum.kirupa.com/t/checking-multiple-variables/313161>\
**Category:** flash\
**Created:** [August 22, 2010, 9:13pm UTC](https://forum.kirupa.com/t/checking-multiple-variables/313161 "2010-08-22T21:13:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shinji246](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@Shinji246](https://forum.kirupa.com/u/Shinji246)\
**Post date:** [August 22, 2010, 9:13pm UTC](https://forum.kirupa.com/t/checking-multiple-variables/313161/1 "2010-08-22T21:13:18Z")

</div>

Hi, I am trying to check through all of my movie clips to see if any of them are on frame 15 so that I can play them. This is my current code

```auto

anybtn = [btn1_mc, btn2_mc];

btn1.onPress = function(){
    
    if(anybtn[0, 1]._currentframe == 15){
        trace ("MC check is working.");
        anybtn.play();
    }
    
    btn1_mc.play();
}

btn2.onPress = function(){

    if(anybtn[0, 1]._currentframe == 15){
        trace ("MC check is working.");
        anybtn.play();
    }    

    btn2_mc.play();
}

```

I would also like to figure out a way for the button i click to wait to play the movie clip after the anybtn movie clip is finished playing. Overall I am trying to achieve a menu that works similar to this [http://declanrabun.com/](http://declanrabun.com/)

So that it will finish playing the first clip before loading the next.

Thanks for any advice in advance!
