# Tell User if they Spell Correctly

**URL:** https://forum.kirupa.com/t/tell-user-if-they-spell-correctly/188028
**Category:** flash
**Created:** [May 3, 2006, 9:45pm UTC](https://forum.kirupa.com/t/tell-user-if-they-spell-correctly/188028 "2006-05-03T21:45:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![funfunfun](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@funfunfun](https://forum.kirupa.com/u/funfunfun)
#### Post date: [May 3, 2006, 9:45pm UTC](https://forum.kirupa.com/t/tell-user-if-they-spell-correctly/188028/1 "2006-05-03T21:45:05Z")

</div>

Does anyone know of a way to give a user feedback on how many letters  
they have entered correctly in a spelling type of game. I have a phrase that needs to be re-spelled correctly in text input fields, that the user clicks into and types into.

I have a basic script that evaluates whether the letter entered in an input field is correct, however I want to create it so that it can return the current number of correct letters. How might I write the AS for such a thing without creating tons of separate statements and Dynamic Text Variables.

Here is a snippet of my code, as you can see the dynamic text variable “answer” is addressing only one letter. How can I make it do double duty and be aware of how many letters are correct?

```auto

stop();

letrA = inputA
if (letrA == "A")	{
	_root.letterA.gotoAndPlay(2);
	answer = "Letter A is Correct!" ;
} else {
	answer = "Wrong" ;
}

```

It could return a statement like, “You have 2 of the correct letters” or “The letters A, R, and T are correct!”
