adding and subtracting from a number within a text box AS3
Hi there,
I imagine this to be a simple question, but I don't seem to be able to figure it out being knee deep in code !!
I have this variable :-
var blackCredit = creditBlack.text;
When I try to add or subtract 1 from the amount in the text box, like this :-
blackCredit += 1;
and then update the text box with the new value :-
creditBlack.text = blackCredit;
It's adding the 1 to the end. i.e. 16 becomes 161, instead of 17..
![]()
Thanks for your help guys and sorry for the dumb question !!!
Martin