Menu Help

Did you do the if else statement?

You have the if statement, but you haven’t showed me the else statement.

So far what you showed me was if j is equal to 5 then set button5’s label to “X”. But what if it isn’t equal to 5? That is where the else statement comes into play.

[AS]if (statement){
//do this
} else {
//do this
}[/AS]

This is where I get confused at, I have tried a few things, this would be easier if u get on AIM, I can IM you and we can stop taking up the forums :o

Refer to the for loop in the script that uses the variable “i” (within the pressed prototype function) on how to target the clips correctly :wink:

[edit]And I can’t come on AIM because I am usually here for short few minute bursts, not really enough time to get into helping one on one. Also it would be easier for you since you won’t have to deal with 12,043 IM windows flying at you begging for help (sometimes I regret adding my SN to my profile before).

bah still cant get it, and i kno its porbably so simple

this[“button”+j].numLabel.text = j :wink:

ok…this is what I concluded but still see teh 5.

[AS]for (var j = 1; j<=5; j++) {
this[“button”+j].numLabel.text = j;
}
if (j == 5) {
this.button5.numLabel.text = “X”;
}else{
this[“button”+j].numLabel.text = j
}[/AS]

::shakes head::

The if/else statement must be contained within the for loop not after the for loop. And remove the original this[“button”+j].numLabel.text = j; that is contained in the for loop now, no need to have it twice.

Heres the final file with the true/false triggers for the rollOver effect.

I know if it took this long to do an if/else statement it will probably takes 10 times as long to explain this since its way more complex, so I left comments in the code that will hopefully allow you to better understand.

ty very very much lol I am such a nub