# Help with function

**URL:** https://forum.kirupa.com/t/help-with-function/179289
**Category:** flash
**Created:** [February 18, 2006, 2:53pm UTC](https://forum.kirupa.com/t/help-with-function/179289 "2006-02-18T14:53:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Terry\_elekes](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@Terry\_elekes](https://forum.kirupa.com/u/Terry_elekes)
#### Post date: [February 18, 2006, 2:53pm UTC](https://forum.kirupa.com/t/help-with-function/179289/1 "2006-02-18T14:53:26Z")

</div>

I am trying to make a game where you type in the width and the height and answer into a input text box. When you press the submit button I am trying to get the answer box to be either the correct answer or show the word wrong. Every time I try something different the answer box always shows the correct answer. Below is the code I am using.  
submit\_btn.onRelease = function() {  
var W:Number = width\_txt.text;  
var H:Number = height\_txt.text;  
var A:Number = answer\_txt.text;  
if (A=(W_H)) {  
answer\_txt.text = W_H;  
} else {  
answer\_txt.text = Wrong;  
}  
};  
clear\_btn.onRelease = function() {  
width\_txt.text = “”;  
height\_txt.text = “”;  
answer\_txt.text = “”;  
};

Could use some help, and explanation as to what I am doing wrong. I attached the small file that I was working with.
