How can I input varables value into a textfield?
var i:uint=0
for(i; i<4; i++){
pageText.text=i+1
}
If i use i+"something" then it can get the i value, but other than that it could not get i value.
How can I input varables value into a textfield?
var i:uint=0
for(i; i<4; i++){
pageText.text=i+1
}
If i use i+"something" then it can get the i value, but other than that it could not get i value.
Try:
var pageText:TextField = new TextField();
var i:uint=0
this.addchild(pageText)
for(i; i<4; i++)
{
pageText.text=i
}
The text property of TextField is expecting a string. Use toString to convert the int.
var i:uint=0
for(i; i<4; i++){
pageText.text=i.toString();
}