FORUMS: list search recent posts

Off-setting one text layer by the length of another

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kyle High
Off-setting one text layer by the length of another
on Oct 26, 2011 at 9:50:06 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


Return to posts index

Dan Ebberts
Re: Off-setting one text layer by the length of another
on Oct 27, 2011 at 12:37:01 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:

http://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



Return to posts index

Kyle High
Re: Off-setting one text layer by the length of another
on Oct 27, 2011 at 1:23:40 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]]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]