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=(WH)) {
answer_txt.text = WH;
} 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.