1
votes

What operator or expression can I use that 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.

3
if numberThing really is a numeric type, then why do you even need put it in an if statement?Kaleb Pederson
@Kaleb, I've tried it without the IF statements. It doesn't receive the values properly if I just associate my tweens to the values I've split. It's barely noticeable in my animations, but I want it to be perfect.anon255058
See a similar question I resolved. stackoverflow.com/questions/2747877/…anon255058
Is that last else if supposed to set AlphaTween_ instead of AlphaTween__?Soldarnal
You're not phrasing your question meaningfully, and thus are unlikely to get an answer that helps. Clearly state: 1. what you want to accomplish, 2. what you've tried, and 3. what (incorrect) behavior the current non-working solution causes.Cory Petosky

3 Answers

0
votes

How about if (numberThing> 0 || numberThing === 0)?

3
votes

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?

3
votes
if(!isNaN(value))