# Input box IF statements

**URL:** <https://forum.kirupa.com/t/input-box-if-statements/250362>\
**Category:** programming\
**Created:** [January 28, 2008, 10:55pm UTC](https://forum.kirupa.com/t/input-box-if-statements/250362 "2008-01-28T22:55:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jose3760](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jose3760/32/2887_2.png) [@jose3760](https://forum.kirupa.com/u/jose3760)\
**Post date:** [January 28, 2008, 10:55pm UTC](https://forum.kirupa.com/t/input-box-if-statements/250362/1 "2008-01-28T22:55:33Z")

</div>

Hello again!  
Im having a problem running an if statement for finding out if what the user has typed into the input box matches what the cheat code actually is.  
Im adding a cheat to my game, so the user needs to type it into the input box, press send, and hope it works. The input box is also inside of a move clip.

Heres the code on the send button…

```auto

on(release){
 if(_root.cheats.text == "speedster"){
  trace ("speedster");
 }else if(_root.cheats.text == "thechosenone"){
  trace ("thechosenone");
 }else if(_root.cheats.text == "multiplier"){
  trace ("multiplier");
 }else{
  trace (" **** didn't work");
 }
}

```

basically what happens is if I copy, lets say speedster, and then paste it into the input box and press send it will come up with “\*\*\*\* didnt work” every time  
I think its pretty simple to fix, but I cant figure out how.  
Thanks! =)
