Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Looping a Precomp Between Defined Frames

  • Looping a Precomp Between Defined Frames

    Posted by Rob Jennings on August 6, 2019 at 7:12 pm

    Hi, I’m having trouble finding an expression that will loop a precomp between a defined start and end frame. I’m familiar with standard loop expressions like loopOut(“cycle”,1), but I really need something that will give me greater control. For example, start loop on frame [15] and loop back to frame 15 after frame [35].

    Is this possible? Thanks!

    Walter Soyka replied 6 years, 9 months ago 2 Members · 3 Replies
  • 3 Replies
  • Walter Soyka

    August 7, 2019 at 2:25 pm

    Use Time Remapping [link] on your precomp layer, set the two keyframes you wish, then use loopOut() as you normally would.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Rob Jennings

    August 7, 2019 at 9:11 pm

    Hey Walter, thanks for your reply. In this case I really need control over the start and end of the loop to exist entirely in the expression. The best I can do at the moment is use a modulo operator on time remapping (time % 30 would loop to the beginning every 30 seconds) but even this doesn’t give me control of the start frame of the loop. Maybe a while statement could do it? Thanks in advance. I’m just beginning to learn java so it’s hard for me to play around with it without getting syntax errors.

  • Walter Soyka

    August 7, 2019 at 9:43 pm

    This expression will do what you want. Use it on the time-remapping property, and ask me questions about whatever isn’t clear:

    var startFrame = 15;
    var endFrame = 35;
    framesToTime((timeToFrames(time) % (endFrame - startFrame + 1)) + startFrame);

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

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