Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Making a loop that changes based off markers.

  • Making a loop that changes based off markers.

    Posted by Darryl Torke on April 23, 2014 at 5:25 pm

    I have a solid that I want to do the following loop…

    frame 1: scale is 100:90
    frame 2: scale is 100:100
    frame 3: scale is 100:90
    (etc..)

    then, after it hits a marker point I want the loop to change to this

    loop2 frame 1 is 100:50
    loop2 frame 2 is 50:100
    loop2 frame 3 is 100:50
    (etc..)

    ideally, I’d like to have even more variations based off new markers in the future.

    is this possible? Unfortunately I cannot time remap a precomp or anything like that because I have other layers that are parented to the scaling layer and would like them to scale with the loops. I hope this makes sense. Thank you.

    Dan Ebberts replied 12 years ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    April 23, 2014 at 8:47 pm

    Something like this should get you started:


    odd = timeToFrames(time)%2;
    if (marker.numKeys > 0 && time > marker.key(1).time){
    odd ? [50,100] : [100,50]
    }else{
    odd ? [100,100] : [100,90]
    }

    Dan

  • Darryl Torke

    April 24, 2014 at 3:11 am

    thanks for the help. what does the ‘?’ in the expression do, exactly?

    thanks again for your assistance.

  • Dan Ebberts

    April 24, 2014 at 3:17 am

    It’s just a compact form of the if/else construct.

    odd ? [50,100] : [100,50]

    is the same as

    if (odd)
    [50,100]
    else
    [100,50]

    Dan

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