ActionScript display zero value
Posted
by bwong
on Stack Overflow
See other posts from Stack Overflow
or by bwong
Published on 2010-06-03T14:37:28Z
Indexed on
2010/06/03
17:34 UTC
Read the original article
Hit count: 196
actionscript-3
|actionscript
It seems the number Datatype handles zeros and nulls the same. I need to display a zero value on the screen, but AS displays nothing. When it's saved, the value is saved as a zero, and therefore shows up zero on the screen. Is there a way to display the zero value using a new object?
public class myObject{
private var numVar:Number
}
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?
© Stack Overflow or respective owner