Ive racked my brain on this one and I just cant seem to see what im doing wrong.
I have 2 text boxes that need to be evaluated against each other.
Both are input boxes that capture and store data into variables. I just want to
compare those values and run the proper code.
It works fine for the first round. If I enter new values, the variables are updated as well. But the new values are not applied to the condition the second time around.
var requested: Number = input_txt1.text;
var total: Number = input_txt2.text;
btn_mc.onMouseUp = doPress;
function doPress () {
var requested: Number = input_txt1.text;
var total: Number = input_txt2.text;
trace (input_txt1.text);
trace (input_txt2.text);
if (total<requested) {
trace ("if statement 1");}
trace (input_txt1.text);
trace (input_txt2.text);
if (requested<total) {
trace ("if statement 2");}
trace (input_txt1.text);
trace (input_txt2.text);
};
Can you see where I went wrong?