1 person found this helpful
You need to execute that conditional test every time you change the value of tot_var. I do not see anything in the code you show where the value would change.
Also, if total_var is the sum of twp numbers, you should declare it as a Number instead of as a String. If you plan to use it to fill a textfield then you can assign it to that textfield as a string when you need to, as in...
yourText.text = String(total_var);
If you are using total_var as the var property of a textfield, don't. Assign the textfield an instance name and assign the value to its text property as I just showed.
thanks Ned always here to help.
I did have my text box as a dynamic box with the instance name score1_txt
which in the code was -
score1_txt.text = total_var;
but it isn now working thankyou!
You're welcome (not sure if that "isn" an "is" or "isn't" in your last sentence)