Nebody good with If/Then Statements

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.

 on (release) {
 if (this == "11") {
  //Movieclip GotoAndPlay Behavior
 } else if (this == "6") {
 } else {
  //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:

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

Why are you using this on your if statements?

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.

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

yes… and im sending the file again. must of been a compression glich i guess. Sorry.

P.S. i took out the sound effects so as to make the file size smaller. but u will see blank layers in there place on the menu layout aswell as the button layout. Thus also the spaced out frames.

The Buttons are buttons within a movieclip themselves.


when you use this as a reference from a button it actually refers to the parent (whether that be the root or another mvoieclip). So you must refer to it using this.button_instance_name or simply button_instance_name instead.