Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Is it possible to have an animation execute every x number of frames?

  • Is it possible to have an animation execute every x number of frames?

    Posted by Ryan Paterson on April 16, 2012 at 5:53 pm

    Wondering if there’s a way with expressions to trigger an animation every x number of frames.

    For example, if I want to move a layer 800px on the Y axis, over a duration of 10 frames, and I want this to happen every 24 frames, how would I code that?

    I accomplished something similar with the loopOut(“offset”) function, just wondering if there’s a non-keyframe way of doing it

    Dan Ebberts replied 14 years, 3 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    April 16, 2012 at 6:36 pm

    Something like this should work:

    f = timeToFrames(time-inPoint);
    seg = Math.floor(f/24);
    f2 = f%24;
    y = seg*800 + linear(f2,0,10,0,800);
    value + [0,y]

    Dan

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