# IF ELSE using TExt Box and Button

**URL:** <https://forum.kirupa.com/t/if-else-using-text-box-and-button/244631>\
**Category:** flash\
**Created:** [November 20, 2007, 1:32pm UTC](https://forum.kirupa.com/t/if-else-using-text-box-and-button/244631 "2007-11-20T13:32:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnno](https://avatars.discourse-cdn.com/v4/letter/j/919ad9/32.png) [@Johnno](https://forum.kirupa.com/u/Johnno)\
**Post date:** [November 20, 2007, 1:32pm UTC](https://forum.kirupa.com/t/if-else-using-text-box-and-button/244631/1 "2007-11-20T13:32:16Z")

</div>

Hi,

I am new to action script and I have been trying to make a simple game. The aim is to discover the correct sequence of buttons to press, then add the button numbers to reveal a success screen. The added number is typed into a text box (or text entry box) and once the button is pressed, it will move to a start again screen or a success screen The code I am using is:

on (release) {  
if (Bob==35) {  
gotoAndPlay(“winner”);  
} else {  
gotoAndStop(“loser”);  
}  
}  
The button does not seem to do any different with a single IF statement.

If you can help you will remove a whole heap of frustration

many thanks in anticipation Johnno :thumb2:
