ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Replace Text before use Expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ronald Grevner
Replace Text before use Expression
on Feb 10, 2017 at 9:14:06 am

Hy,

I have a Text layer, that is expression drived.


L = text.sourceText.length;
It = time - thisLayer.inPoint;
T = It*effect("Speed")("ADBE Slider Control-0001") - effect("Start After")("ADBE Slider Control-0001")*effect("Speed")("ADBE Slider Control-0001");
F = Math.round( It % 1.2);
if(F==1 |(T0)){Fl="|";}else{Fl="";}

substr(0,T) + Fl



Now i Want to replace the Text with the sourcetext of an other Layer.

Just to link above:

comp("Program title MASTER").layer("Neuer Text").text.sourceText

doesnt work.


So how can I replace the Text before the Expression is doing his job?

Thank you!

Beste Regards
Ronald


Return to posts index

Dan Ebberts
Re: Replace Text before use Expression
on Feb 10, 2017 at 5:10:08 pm

I haven't tested it, but probably something like this:

txt = comp("Program title MASTER").layer("Neuer Text").text.sourceText;
L = txt.length;
It = time - thisLayer.inPoint;
T = It*effect("Speed")("ADBE Slider Control-0001") - effect("Start After")("ADBE Slider Control-0001")*effect("Speed")("ADBE Slider Control-0001");
F = Math.round( It % 1.2);
if(F==1 |(T0)){Fl="|";}else{Fl="";}

txt.substr(0,T) + Fl


Dan



Return to posts index

Ronald Grevner
Re: Replace Text before use Expression
on Feb 12, 2017 at 7:51:03 pm

Hy dan,

thank you.

txt.substr() is the key!

RonG


Return to posts index

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