Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Need help with an expression please!

  • Need help with an expression please!

    Posted by Scott Jordan on December 7, 2020 at 1:07 am

    I have a lower-third. Just text with a solid box below. I want a light sweep to move across the box from the first character to the last whether it’s 5 characters or 50 characters long for a template. How can I set the sweep to move in 2 seconds from the first letter to the last?

    Boris Norkin replied 5 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Boris Norkin

    December 7, 2020 at 3:51 pm

    Hi!

    I’d try to create two additional sliders: one that will contain the animation of the sweep effect and the second one with an offset from text borders. Name them accordingly to names in an expression.

    Then move anchor point of a text layer to the middle if its left side.

    After that just apply that expression on a center of the light sweep effect:

    var y = thisComp.layer(“Text”).transform.position[1];
    var x = linear(effect(“SweepProcess”)(“Slider”),0,100,thisComp.layer(“Text”).transform.position[0] – effect(“Offset”)(“Slider”), thisComp.layer(“Text”).transform.position[0] + thisComp.layer(“Text”).sourceRectAtTime().width + effect(“Offset”)(“Slider”));

    [x,y]

    Should work

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