# Using Type Input in Conditional Statement

**URL:** <https://forum.kirupa.com/t/using-type-input-in-conditional-statement/248138>\
**Category:** flash\
**Created:** [January 4, 2008, 8:29am UTC](https://forum.kirupa.com/t/using-type-input-in-conditional-statement/248138 "2008-01-04T08:29:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![affirmallchance](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@affirmallchance](https://forum.kirupa.com/u/affirmallchance)\
**Post date:** [January 4, 2008, 8:29am UTC](https://forum.kirupa.com/t/using-type-input-in-conditional-statement/248138/1 "2008-01-04T08:29:13Z")

</div>

If the user types “ball” in the input textfield, instance name: name\_txt, I want to move to the next frame and stop. Can somebody tell me, what I am doing wrong here? Thank you!

submit\_btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):void  
{  
if(name\_txt.text == “ball”)  
{  
gotoAndStop(2);  
}  
}
