Hey
I’m trying to make a little controller that will increase and decrease the digits within a dynamic text box. The subtract button works fine. It’s just the addition button which is causing me problems.
Instead of increasing the digit by one… its adding a one to the end of the dynamic text field.
Here’s a mock up of what I’m trying to do:
[AS]number_text.onChanged = function() {
this.restrict = “0-9”;
};
number_text.onChanged();
//
right_btn.onPress = function() {
if ((number_text.text<=100) && (number_text.length<=3) && (number_text.text !== “”)) {
number_text.text = number_text.text+1;
}
};
//
left_btn.onPress = function() {
if ((number_text.text>=1) && (number_text.text !== “”)) {
number_text.text = number_text.text-1;
}
};
[/AS]