Input text quiz actionscript problem/question

I am working on a quiz with input text boxes. the user will enter a letter into the input box, then click a button to check answers. If the answer is correct, the text should turn green. If wrong the text should turn red and give feedback to try again for the red letters. I have started the page and the actionscript on the check answers button, but I don’t know if I am even moving in the right direction. Please help me!

I can’t open your attachment…but I’ll do my best.

Let’s say your Input Text has an instance name of “tfield” and a Var as "input"
Put this code on a button:

 
on (release) {
	 if (_root.input == "dog") {
		 format = new TextFormat();
		 format.color = 0x006600;
		 tfield.setTextFormat(format);
	} else {
		 format = new TextFormat();
		 format.color = 0xFF0000;
		 tfield.setTextFormat(format);
	}
}

Here’s a site about formating text fields:
http://www.kirupa.com/developer/actionscript/textfield.htm

hope it helps :slight_smile: