ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

loopOut("cycle") function not working

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Trevor Scruggs
loopOut("cycle") function not working
on Jul 13, 2020 at 9:56:44 pm



I am using a source text and want it to transition from "START" to "GAME" back and forth infinitely using loopOut('cycle") but this message pops up.


Return to posts index

Filip Vandueren
Re: loopOut("cycle") function not working
on Jul 13, 2020 at 10:54:04 pm

unfortunately, that's a quirk of the sourceText parameter.
Because this property is a special case (no interpolation between keyframes, only hold keyframes) the loopOut() method is not supported.

try something like this:

if (numKeys>1 && time>key(numKeys).time) {
t1 = key(1).time;
t = time - t1;
d = key(numKeys).time - t1;

valueAtTime( t1 + t%d);
} else {
value;
}


You'll need a third keyframe though, to provide the timing where you want the first keyframe repeated. (otherwise the 2nd key is only ever shown for 1 frame, that's just the quirky way loopOut() works)



Return to posts index

Filip Vandueren
Re: loopOut("cycle") function not working
on Jul 13, 2020 at 10:57:59 pm

alternatively, in this case where you just want to repeat 2 keyframes at known times 0 and 0.8secs , this simpler expression will work too:

valueAtTime(time%1.6);

I just guesstimated that your 2nd keyframe was at .8 seconds, so adjust to your needs.



Return to posts index


Trevor Scruggs
Re: loopOut("cycle") function not working
on Jul 14, 2020 at 2:44:17 pm

It worked! Thanks a lot. I added the third keyframe. Is there a name for those type of expressions or a place to learn those?


Return to posts index

Filip Vandueren
Re: loopOut("cycle") function not working
on Jul 15, 2020 at 7:20:59 pm

This looks like a great place to learn a lot about expressions:

https://www.animoplex.com/learn/expressions.html#101



Return to posts index

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