What logic operator to use, AS3?
What operator or expression can I use tha开发者_开发技巧t will fire on every number, including zero?
I want a logic operator that will fire with ever number it receives. My animations pause at zero.
This skips on zero
if (numberThing> 0);
This jitters 'fires quickly and goes back on count'
if (numberThing== 0);
alt text http://www.ashcraftband.com/myspace/videodnd/logicTest.jpg
EXPLANATION
I'm catching split string values in a logic function, and feeding them to a series of IF, ELSE IF statements. I'm using this with a timer, so I can measure the discrepancy.you could do
if(numberThing >= 0)
or if they are all numbers anyway
if(true)
kind of strange that it wouldn't just run with no if statements, is there anywhere else this issue could be coming from?
if(!isNaN(value))
How about if (numberThing> 0 || numberThing === 0)
?
精彩评论