ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Extracting individual characters from a text layer (expressions)

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Brad BackofenExtracting individual characters from a text layer (expressions)
by on Sep 13, 2012 at 8:04:27 pm

So here's what I'm trying to do (not sure if it's possible).

I have a comp where I'm performing some somewhat complex animation to individual text characters that eventually spell out a word. I'm making a template version that will eventually need to be duplicated for many different words. So, lets say the word I'm animating is "PARTY". I have 5 text layers. One for each letter.

Is it possible for me to have an additional hidden text layer that says "PARTY", and then my 5 layers look at that master text layer and pull their character values from it? I imagine it'd have to have some kind of (index+1) sort of thing so that it figures out which letter to choose based on it's layer order. Then if I have longer words (which I surely will), I just need to duplicate the single-character layers and adjust their position. Any help would be hugely appreciated!

Return to posts index

Brad BackofenRe: Extracting individual characters from a text layer (expressions)
by on Sep 13, 2012 at 9:02:42 pm

Actually, nevermind. Fixed my own problem (after seeing Dan Ebbert's post about the "slice" property. Assuming the layers are in the correct order (top to bottom), if I add the following:

thisComp.layer("master text layer").text.sourceText.slice(index-1,index)

The individual text layers will return a single character, in the order the layers are in. Sweet!

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved