Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Switching between words randomly expression?

  • Switching between words randomly expression?

    Posted by Göran Thorén on May 25, 2018 at 7:20 am

    Hi there all you expression gurus!

    I’m trying to work out how to randomly switching words that recides on separate layers or possibly in the same layer.
    In the end, what I’m actually trying to achieve is to somehow have a comp that randomly switches between all the month of the year, preferably with som level of control of how long each word stays visible.

    Does this make sense at all?

    Thanks in advance!
    /Göran

    Göran Thorén replied 7 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 25, 2018 at 10:11 am

    Maybe a Source Text expression like this:

    months = [“JAN”,”FEB”,”MAR”,”APR”,”MAY”,”JUN”,”JUL”,”AUG”,”SEP”,”OCT”,”NOV”,”DEC”];
    dur = .5; // change every .5 seconds
    seed = Math.floor((time-inPoint)/dur);
    seedRandom(seed,true);
    idx = Math.floor(random(months.length));
    months[idx]

    Dan

  • Göran Thorén

    May 27, 2018 at 4:20 pm

    Well, what can I say… That is exactly what I meant, works like a total charm! Thank’s a million Dan!

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