# Nebody good with If/Then Statements

**URL:** <https://forum.kirupa.com/t/nebody-good-with-if-then-statements/115263>\
**Category:** Uncategorized\
**Created:** [July 7, 2004, 2:35am UTC](https://forum.kirupa.com/t/nebody-good-with-if-then-statements/115263 "2004-07-07T02:35:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlackFire](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@BlackFire](https://forum.kirupa.com/u/BlackFire)\
**Post date:** [July 7, 2004, 2:35am UTC](https://forum.kirupa.com/t/nebody-good-with-if-then-statements/115263/1 "2004-07-07T02:35:08Z")

</div>

I have a simple If/Then Statement problem. I’m trying to get this button to change it self through an if/then conditional. In addition i’d like the get the button value to remain after the menu is re-minimized (if user clicks button to make it red, then when they re-minimize and then re-maximize it remained red). But i don’t kno where to start there.

i have used the following coding for my button if/then conditional.

```auto
 on (release) {
 
 if (this == "11") {
  //Movieclip GotoAndPlay Behavior
  this.gotoAndPlay("2");
 } else if (this == "6") {
  this.gotoAndPlay("7");
 } else {
  this.gotoAndPlay("7");
  //End Behavior
 }
}
 

```

P.S. I only did one button to learn the concept. So to neone who knows about if/then or boolean conditionals, and can solve this simple issue, please break it down and explain it to me. I wish to learn this concept.

Thanks before hand. :ne:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 2:38am UTC](https://forum.kirupa.com/t/nebody-good-with-if-then-statements/115263/2 "2004-07-07T02:38:51Z")

</div>

Duh!! Seems i forgot the attachment. Sorry! 8-]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 3:11am UTC](https://forum.kirupa.com/t/nebody-good-with-if-then-statements/115263/3 "2004-07-07T03:11:44Z")

</div>

Why are you using _this_ on your if statements?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 4:00am UTC](https://forum.kirupa.com/t/nebody-good-with-if-then-statements/115263/4 "2004-07-07T04:00:30Z")

</div>

when implementing behaviors to the button the _this_ was used to tell flash which frame within which **layer** to play. Shouls i have something else in place of it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 7, 2004, 1:40pm UTC](https://forum.kirupa.com/t/nebody-good-with-if-then-statements/115263/5 "2004-07-07T13:40:59Z")

</div>

The file is empty.  
Are you uusing a movieclip as a button?
