This content has been marked as final. Show 4 replies
use the Number() function to convert strings to numbers. (your textfield text property is a string.)
Thanks for the reply
I looked up the Number() function in help, and I changed the code to the code below. That fixed the previous problem, but the new issue is that it only goes up to 1. Is there an issue with my AS? Thanks
you are setting the_box at the beginning, and then when the button is pressed you add one to it each time. if you want to add to the number in the textbox each time, you need to calculate from that in the onPress handler eg:
that will only work because the as2 compiler doesn't really do much class checking. but it should object to trying to type the_box as a number. it's a string.