# AS 2.0 - simple if/else input text quiz

**URL:** <https://forum.kirupa.com/t/as-2-0-simple-if-else-input-text-quiz/298379>\
**Category:** flash\
**Created:** [October 17, 2009, 5:30pm UTC](https://forum.kirupa.com/t/as-2-0-simple-if-else-input-text-quiz/298379 "2009-10-17T17:30:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![design8creative](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@design8creative](https://forum.kirupa.com/u/design8creative)\
**Post date:** [October 17, 2009, 5:30pm UTC](https://forum.kirupa.com/t/as-2-0-simple-if-else-input-text-quiz/298379/1 "2009-10-17T17:30:59Z")

</div>

Hi everyone,

Let me first start by saying how great of a resource this forum is. Very informative and helpful to read through.

I have a question regarding an if/else statement I am creating for a simple quiz test in Flash ActionScript 2.0. I have the .FLA file attached.

On the main stage I have the following:  
[LIST]  
[_]a yes-or-no question (static text)  
[_]an input box (input text, variable: vAnswer)  
[_]a button for submit  
[_]I have frame labels of “yes” and “no” with keyframes to jump a message to the user about if their answer was correct or not  
[/LIST]My button has the following script:

on(release) {  
[COLOR=red]if(vAnswer == “yes”){  
[/COLOR] gotoAndPlay(“yes”);  
}else{  
gotoAndPlay(“no”);  
}  
}

Am I not doing this correct? Everytime I type [COLOR=red]yes [/COLOR]into the input box, it jumps me to my “no” label. I have researched, and I am doing something so simple and wrong, but I can’t figure it out for the life of me. Something tells me my line I have in red color is wrong?

May someone please help me get past this obstacle so I can do a larger project?

Thank you so much!
