Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Replace Text before use Expression

  • Replace Text before use Expression

    Posted by Ron Grev on February 10, 2017 at 9:14 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

    Ron Grev replied 9 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 10, 2017 at 5:10 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

  • Ron Grev

    February 12, 2017 at 7:51 pm

    Hy dan,

    thank you.

    txt.substr() is the key!

    RonG

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