Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Jumping to a specific frame inside precomp when hitting specific position

  • Jumping to a specific frame inside precomp when hitting specific position

    Posted by Saara Salminen on January 17, 2019 at 8:33 pm

    Hi!
    I wish to achieve an expression of the following:

    When the x-position of current layer hits the x-position of layer “Layer2” (the position values are not separated on either layer, if that matters somehow), the time inside a precomp (“Precomp1”) jumps to a specific frame, like frame 30 for example.

    I’m not too familiar with expressions, and this is probably pretty basic, but I’d appreciate any help I can get.

    Thanks in advance,
    Saara

    Saara Salminen replied 7 years, 4 months ago 2 Members · 3 Replies
  • 3 Replies
  • Griffin Englander

    January 17, 2019 at 11:28 pm

    Assuming you only want the frame to be frozen when the positions match.. I think this works.

    a = thisComp.layer("Layer2").transform.position[0];
    b = thisLayer.transform.position[0];
    v = framesToTime(30);
    if (a==b) v else value;

  • Griffin Englander

    January 17, 2019 at 11:29 pm

    Sorry, that expression should go on TimeRemap on your PreComp.

  • Saara Salminen

    January 21, 2019 at 6:52 pm

    This works perfectly, and also makes sense. Thank you very much!

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