# "IF" statemenet help

**URL:** https://forum.kirupa.com/t/if-statemenet-help/195482
**Category:** flash
**Created:** [August 1, 2006, 3:01am UTC](https://forum.kirupa.com/t/if-statemenet-help/195482 "2006-08-01T03:01:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![youwh](https://avatars.discourse-cdn.com/v4/letter/y/82dd89/32.png) [@youwh](https://forum.kirupa.com/u/youwh)
#### Post date: [August 1, 2006, 3:01am UTC](https://forum.kirupa.com/t/if-statemenet-help/195482/1 "2006-08-01T03:01:14Z")

</div>

```auto
if (targets="") {
   gotoAndStop(1);
} else if (targets="structure") {
   gotoAndStop(1);
} else if (targets="principal") {
   gotoAndStop(1);
} else if (targets="vision") {
    gotoAndStop(2);
} else if (targets="directors") {
   gotoAndStop(3);
}

```

If I have several “if” statement running the same action, is there anyway to shorten the script? And my another question is, why does the script keeps running the last line “directors” even though my “target”(variables) shows “structure”?
