Input Text
Hello, I'm relatively new to Action Script 3, so I'm having some trouble with an Input Text code.
I have an Input box called "caja" and I want people to enter the right answer, so I have some code in place that supposedly redirects you to another scene depending on your answer. The thing is when I enter the right answer it takes me to the wrong answer scene. The wrong answer does work but for some reason, the other one doesn't. Any ideas?
Code:
var check:Boolean = false;
var input1:String;
var answer = "no";
button_12.addEventListener(MouseEvent.CLICK, checkClick);
function checkClick(event:MouseEvent):void{
input1 = caja.text;
check = true;
if (input1 == answer) {
gotoAndPlay(1, "Scene 4");
}
else gotoAndPlay(110, "Scene 4");
};
