# Odd if statement/varialbles question?

**URL:** <https://forum.kirupa.com/t/odd-if-statement-varialbles-question/313466>\
**Category:** flash\
**Created:** [August 31, 2010, 2:57pm UTC](https://forum.kirupa.com/t/odd-if-statement-varialbles-question/313466 "2010-08-31T14:57:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darastudio](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/darastudio/32/3764_2.png) [@darastudio](https://forum.kirupa.com/u/darastudio)\
**Post date:** [August 31, 2010, 2:57pm UTC](https://forum.kirupa.com/t/odd-if-statement-varialbles-question/313466/1 "2010-08-31T14:57:52Z")

</div>

I wasn’t even sure how to search to see if this existed.

Say I have a list (array) of functions  
s\_0, s\_1, s\_2, etc… probably going to be 30 or so in the list.

Is there a way to do an if statement so that…

if the last function == s\_0 … do this thing  
else the last function == s\_2 … do this other thing

i’m basically doing a linear presentation of functions  
and i need the ability to go foward and backwards… but the animations/functions may be different depending on the direction, up or down in the list.

Help? :puzzled:
