# Actionscript2-Input text issue

**URL:** <https://forum.kirupa.com/t/actionscript2-input-text-issue/257758>\
**Category:** flash\
**Created:** [April 16, 2008, 8:50pm UTC](https://forum.kirupa.com/t/actionscript2-input-text-issue/257758 "2008-04-16T20:50:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boondogger](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@Boondogger](https://forum.kirupa.com/u/Boondogger)\
**Post date:** [April 16, 2008, 8:50pm UTC](https://forum.kirupa.com/t/actionscript2-input-text-issue/257758/1 "2008-04-16T20:50:45Z")

</div>

I’m working on a quiz and I have a variable containing the anwer to a question:

var answer=“Constantine”;

On screen there’s an input text box which gets the user to enter their answer. The input text var is txt. I then compare txt with answer to see if they are the same:

if(\_root.answer==\_root.txt)  
{  
//do stuff here  
}  
Unfortunately it doesn’t work because the txt var includes a load of html stuff as well as the word Constantine even if the user types it correctly. It’s probably really basic stuff but what do I do to get round this?
