Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions loopOut – How to set how many loops I want, then stop?

  • Elad Menashe

    November 6, 2012 at 8:52 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 < (loops * (LastKeyFrameTime - FirstKeyFrameTime))) {
    loopOut(type = "cycle", numKeyframes = 2)
    }
    else {
    position.valueAtTime(LastKeyFrameTime )
    }

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy