FORUMS: list search recent posts

loopOut - How to set how many loops I want, then stop?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chase Setser
loopOut - How to set how many loops I want, then stop?
on Nov 6, 2012 at 5:41:13 am

I was wanting this text to scroll down twice (looping inside this box twice) and then stopping in the middle of the box. Is there a way to do that?


Return to posts index

Elad Menashe
Re: loopOut - How to set how many loops I want, then stop?
on Nov 6, 2012 at 8:52:31 am

The attached code works on position property, you will need to change it in case a different property is desired.
The number of loops is set by the loops variable.

Note: the actual property change done via keyframes is considered as the first loop.

Elad

loops = 5;
FirstKeyFrameTime = thisComp.layer(index).position.key(1).time;
LastKeyFrameTime = thisComp.layer(index).position.key(numKeys).time;
if (time &lt; (loops * (LastKeyFrameTime - FirstKeyFrameTime))) {
loopOut(type = "cycle", numKeyframes = 2)
}
else {
position.valueAtTime(LastKeyFrameTime )
}



Return to posts index

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