# Actions based on certain conditions

**URL:** <https://forum.kirupa.com/t/actions-based-on-certain-conditions/71621>\
**Category:** Uncategorized\
**Created:** [November 27, 2004, 4:29am UTC](https://forum.kirupa.com/t/actions-based-on-certain-conditions/71621 "2004-11-27T04:29:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![graylensman](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@graylensman](https://forum.kirupa.com/u/graylensman)\
**Post date:** [November 27, 2004, 4:29am UTC](https://forum.kirupa.com/t/actions-based-on-certain-conditions/71621/1 "2004-11-27T04:29:00Z")

</div>

Back again with another MX 2004 actionscript question! 😛

I have two buttons. When ButtonBlue is clicked, TitleBlue slides into place. When ButtonRed is clicked, TitleRed slides into (the same) place. This AS works just fine.

what I want now is- if TitleBlue is in place, when you click on ButtonRed, TitleBlue slides out and TitleRed slides in. (Vice versa for ButtonBlue). I’ve tried “if” statements, “if-else” statements. Nothing seems to work.

I’ve attached the .fla. It’s an MX 2004 file.

thanks again for your help!!
