# Can the if/else statement help?

**URL:** <https://forum.kirupa.com/t/can-the-if-else-statement-help/247187>\
**Category:** flash\
**Created:** [December 19, 2007, 10:19am UTC](https://forum.kirupa.com/t/can-the-if-else-statement-help/247187 "2007-12-19T10:19:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheena](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@sheena](https://forum.kirupa.com/u/sheena)\
**Post date:** [December 19, 2007, 10:19am UTC](https://forum.kirupa.com/t/can-the-if-else-statement-help/247187/1 "2007-12-19T10:19:33Z")

</div>

I have two buttons on the root level that share the same animation movie clip when pressed, at the end of the animation I need the actionscript in the last frame to identify which button had been pressed so it can then be directed to the appropriate root level frame for that button.

Can I achieve this with the if/else statement?, if so can someone show me how that would need be written.

As always, many thanks for your help
