There's a button I have in which the player should be able to enter a code. If they put in the correct code, they're taken to the "correct" frame, but if they're wrong, they should be taken to the "wrong" frame. The problem I'm encountering is that regardless of the text inputted, the player is taken to the "wrong" screen. Here's my current code:
on (release) {
if (combo eq "blue"){
gotoAndStop("correct");
} else {
gotoAndStop("wrong");
}
}
and i've also tried the if() statement being
if (combo == "blue")
The input textbox has a variable name of 'combo' and an instance name of 'code'.
First of all, the
eqoperator was deprecated since Flash Player 5 in favor of the==(equality) operator.On the other hand, to get the selected
item labelof your combo box, you have to use it'svalueproperty:Your code:
Other remark : It seems that combo should rather be written _parent.combo