Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Decode text every 2 frames

  • Decode text every 2 frames

    Posted by Dmitrii Vac on March 1, 2020 at 12:34 am

    Hi

    I use this expression for decode effect to my text.
    What do I need to add to the code, for decode letter every 2 frame?

    c = ['D','C','B','N','M','T'];
    s = "";
    for(x=0; x < value.length; x++){
    r = Math.floor(random(0, c.length));
    s += c[r];
    }
    s

    Dan Ebberts replied 6 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    March 1, 2020 at 1:32 am

    Like this maybe:


    c = ['D','C','B','N','M','T'];
    s = "";
    for(x=0; x < value.length; x++){
    r = Math.floor(random(0, c.length));
    s += c[r];
    }
    f = timeToFrames(time);
    n = Math.floor(f/2);
    value.substr(0,n) + s.substr(n)

    Dan

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