ActionScript display zero value
public class myObject{
private var numVar:Numb开发者_如何学Cer
}
My AS file:
var temp:MyObject
temp.numVar = 0;
When I debug, temp.numVar
contains a value of 0
, but does not show anything on the UI. If this object is then saved to the DB, and then displayed to the UI, it shows a 0
. My question is - how do I get temp.numVar
to display 0
before persistenting it to the DB?
Try converting the value of temp.numVar
to a string before you send it to the TextField.
See my example:
var numVar:Number = 0;
someTextField.appendText(String(temp.numVar));
精彩评论