ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Problem with text animator by character and two lines sourceText

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sebastien Bruzzo
Problem with text animator by character and two lines sourceText
on Nov 10, 2018 at 5:22:54 pm
Last Edited By Sebastien Bruzzo on Nov 11, 2018 at 12:02:45 am

Hello everyone !

I'm confronted with a tricky text animator situation :

There is a sentence made of two parts "Part01" ("Hello Sir") and "Part02" ("How are you ?") both in the same line.
These two parts can be different, so the number of characters in each part could be different.
I took Part01 from a text layer using sourceText, same for Part02 from another text layer, and added the two parts in a third text layer, as follows
TextPart01 = thisComp.layer("SOURCE_TEXT ligne 01").text.sourceText;
TextPart02 = " " + thisComp.layer("SOURCE_TEXT ligne 02").text.sourceText;
TextPart01+TextPart02

In this third text layer I want to drive the opacity for each character of Part02 - and only Part02 - with a text animator.
So we have :
- "Hello Sir How are you ?" is the text resulting from Part01 + Part02. Total : 9 + 14 = 38 characters
- "Hello Sir" is already visible, then Part02 is revealed with the text animator.

I'm looking for the expression in the Start value of the Range Selector that would always start at the point where Part02 starts. And works whatever lenghts are Part01 and Part02 of the desired sentence. Not sure I'm making myself clear :))


Thank you everyone for your help !


Return to posts index

Kalleheikki Kannisto
Re: Problem with text animator by character and two lines sourceText
on Nov 11, 2018 at 9:37:36 am

I'd guess it would be like this:
L1 = TextPart01.length;
L2 = TextPart02.length;
L = L1+L2;
startPos = 100/L*L1


Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

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