ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

whats my wrong

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tunc Erenkus
whats my wrong
on Sep 13, 2019 at 11:04:23 am

Hi,

when l try to drive this code (on source text), the result is always 'else'. Can you please show me whats my mistake.

Thanks

a=inPoint;
t=time;
if (a=t) txt = "equal";
if (a>t) txt = "-time";
if (a<t) txt = "+time"
else {
txt = "else"
}
text.sourceText + txt + " " + time + " " + inPoint


Return to posts index

Dan Ebberts
Re: whats my wrong
on Sep 13, 2019 at 1:37:45 pm

I'm not sure what you're trying to do exactly, but I think it would be more like this:

a=inPoint;
t=time;
if (t < a) txt = "-time"
else if (t == a) txt = "equal"
else txt = "+time";
value + txt + " " + time + " " + inPoint

however, the "-time" will never show up because it happens before the layer's inPoint.


Dan



Return to posts index

Tunc Erenkus
Re: whats my wrong
on Sep 14, 2019 at 7:49:46 am

Thank you for your interest.

Actually, I am trying to solve this issue: My first layer's x position is looping and second layer's x position linked it. The inPoint of second layer is random. I am trying to grab the first layer's x value in the frame of second layer's inPoint.

I thought I might solve it with if command. Better idea?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]