Thread View: adobe.after.effects.expressions
3 messages
3 total messages
Started by Rick_Gerard
Sat, 21 Feb 2009 17:32
java or operator statement and expressions
Author: Rick_Gerard
Date: Sat, 21 Feb 2009 17:32
Date: Sat, 21 Feb 2009 17:32
11 lines
979 bytes
979 bytes
So I tried to simplify some code this morning using the java or operator and it doesn't seem to work. It went something like this:
if ((time < 4) || (time > 10))}
val = aVariable}
else val=0;
What I end up with is zero until 4 but after 10 the val does not return to 0.
I hope this makes sense to somebody out there. I just went back to a stack of if else statements to solve the problem.
Thanks
Re: java or operator statement and expressions
Author: Dan_Ebberts
Date: Sat, 21 Feb 2009 20:37
Date: Sat, 21 Feb 2009 20:37
9 lines
807 bytes
807 bytes
I'm not sure what the problem is (except that your curly brackets are wrong), but this opacity expression works:
if ((time < 4) || (time > 10)){
0
}else{
100
}
Dan
Re: java or operator statement and expressions
Author: Rick_Gerard
Date: Sat, 21 Feb 2009 23:24
Date: Sat, 21 Feb 2009 23:24
5 lines
704 bytes
704 bytes
Thanks Dan. That was it. When I'm coding at 3AM i tend to make silly type-os... and omissions! Rick
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads