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
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.
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.
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.
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.
Creating engaging and entertaining content for designers and developers since 1998.