# How to shorten IF statement

**URL:** <https://forum.kirupa.com/t/how-to-shorten-if-statement/54147>\
**Category:** Uncategorized\
**Created:** [June 11, 2004, 12:20pm UTC](https://forum.kirupa.com/t/how-to-shorten-if-statement/54147 "2004-06-11T12:20:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![macneilslt](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@macneilslt](https://forum.kirupa.com/u/macneilslt)\
**Post date:** [June 11, 2004, 12:20pm UTC](https://forum.kirupa.com/t/how-to-shorten-if-statement/54147/1 "2004-06-11T12:20:32Z")

</div>

say i have 3 MCs, and i need to check the frames on each one…

```auto

checkFrames = function() {
   if(mc1._currentframe == 1 && mc2._currentframe == 1 && mc3._currentframe == 1) {
            trace("match");
     }
}

```

Is there a more efficient way to write the same IF statement?
