Hello!
Im having some problems updating a dynamic text field via a button. I want to make number field that you can either increase or decrease with two buttons.
Somehow the variable I assign to textFieldName.text won't show up in the field when I click the button? The update works but the updated text don't show up in the field?
here's my code:
Code:
on(press) {
if (gCount == undefined) {
var gCount:Number = 0;
gCounter.text = gCount;
}
else if (gCount > 10) {
trace('Bigger than 10');
}
else {
gCount = ++gCount;
gCounter.text = gCount;
trace('G counter = ' + gCounter.text);
}
}
I've tried formatting the gCount to a string without success.
Anyone have any solution? That would be great.
If you have suggestions on how to solve the problem on some other way that would be nice as well!