Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Text writes on after it changes via markers on the comp

  • Text writes on after it changes via markers on the comp

    Posted by David Cabestany on January 15, 2020 at 9:06 pm

    I’m using the expression below to have a long text change each time a marker is passed, the text is written in each marker comment.

    In the same layer I have a text animator that writes the text on, much like the typewriter preset, but also driven with by an expression (expression below).

    The problem is the text only writes on at the very beginning and after it only changes to what the marker has in it but without any animation

    Is there a way to have it write on each time it changes without having to create different layers for it? The expression that writes on does it based on the in point of the layer.

    Thanks in advance.

    txt = value;
    n = 0;
    if (thisComp.marker.numKeys > 0){n = thisComp.marker.nearestKey(time).index;
    if (thisComp.marker.key(n).time > time) n--;
    if (n > 0) txt = thisComp.marker.key(n).comment;
    }
    txt;
    --------

    topVal=100
    fadeDur = thisComp.layer("xp").effect("fadeDur")("Slider");
    if (time < (inPoint+outPoint)/2)
    ease(time,inPoint,inPoint+fadeDur,0,topVal)
    else
    ease(time,outPoint-fadeDur,outPoint,topVal,0)

    David Cabestany replied 6 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 15, 2020 at 9:36 pm

    Try this for your range selector Start parameter:


    spd = 10; // characters per second
    n = 0;
    if (thisComp.marker.numKeys > 0){
    n = thisComp.marker.nearestKey(time).index;
    if (thisComp.marker.key(n).time > time) n--;
    }
    if (n > 0){
    t = time - thisComp.marker.key(n).time;
    dur = text.sourceText.length/spd;
    linear(t,0,dur,0,100);
    }else
    0

    Dan

  • David Cabestany

    January 15, 2020 at 9:40 pm

    As usual, this is perfect. All I had to do was speed it up so my sentences can complete before the next marker hits.

    Thanks a lot Dan!

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