Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Off-setting one text layer by the length of another

  • Off-setting one text layer by the length of another

    Posted by Kyle High on October 26, 2011 at 9:50 pm

    Hello all,
    I’m trying to streamline the following process. I’m building intro animations for a 10 session DVD in AE CS5.5. Each animation has the name of the DVD followed by a session number.

    For example: “After Effects 101 – Session 1”

    I want to be able to precomp “After Effects 101″ and change it for the next series, but leave ” – Session 1″ alone. Example: “Avid 101 – Session 1”. I want “- Session 1” to automatically keep the correct offset no matter the length of the name.

    I think this can be done with expressions, but here’s the problem I’m trying to figure out. “After Effects 101″ is a different font and size than ” – Session 1″.

    I would greatly appreciate any suggestions?

    Thanks, Kyle
    My current system: Adobe Production Premium CS 5.5, 2.2 GHz Intel Core i7, 17″ MBP with 8GB Ram

    Kyle High replied 14 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 27, 2011 at 12:37 am

    If you use a script or an expression to modify the text, you’ll lose the multiple-font formatting, so you would have to use separate layers. This thread (I think there are several–just search for sampleImage) talks about a way to find the edges of a text layer with an expression:

    https://forums.creativecow.net/readpost/227/15134

    How are you planning on updating the text? If you do it with a script, the script could reposition the other layer.

    Dan

  • Kyle High

    October 27, 2011 at 1:23 am

    Thanks for your reply Dan. This is exactly what I was looking for.

    The multifont formatting is where I was running into problems. I changed the first line of you expression to point to the text layer in my pre-comp. Works perfectly!

    I think I know what you’re talking about with the script idea, but this solution allows us to format once and have all the titles update. Each open has the DVD Title followed by the Session number. Underneath that is each session’s title. Those have to be entered manually, because some are short and some long. Some are one line and some are two.

    Thanks again for your help!
    Kyle

    L = comp("Series Name").layer("Series Name");
    for (i = thisComp.width; i >= 0; i--){
    temp = L.sampleImage([i,thisComp.height/2],[0.5,thisComp.height/2],true,time);
    if (temp[3] > 0) break;
    }
    [i,value[1]]

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