Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Random character opacity on and off

  • Jessica Lawheed

    September 17, 2021 at 7:18 pm

    In V 18.4.1 I am getting an error saying there is a “SyntaxError unexpected token ‘else'”. Any fixes for this?

  • Dan Ebberts

    September 17, 2021 at 7:25 pm

    If it’s the most recent expression, you probably just need to replace this:

    if ((time-inPoint) < myReveal) 100 else 0

    with this:

    (time-inPoint) < myReveal ? 100 : 0

  • Adam Goddard

    May 27, 2022 at 7:37 am

    Hi there I know this is from a long time ago, I was wondering if you could tell me a way of altering this expression to make the opacity fade or ramp as the characters randomly fade on and off. Thank you very much

  • Adam Goddard

    May 27, 2022 at 7:46 am

    Hi there I know this is been a long long time since the post. But I would like to use this expression however is it possible to ramp the opacity of the characters? If you could please let me know thank you.

  • Dan Ebberts

    May 27, 2022 at 3:27 pm

    It depends on which expression you mean, but with the latest one, you could do something like this:

    revealTime = 3; // reveal over 3 seconds

    fadeTime = .5;


    myReveal = random(revealTime);

    linear((time-inPoint), myReveal, myReveal+fadeTime, 100, 0)

    or maybe switch the last line to this:

    linear((time-inPoint), myReveal, myReveal+fadeTime, 0, 100)

    depending on whether you want the letters to fade in or out.

Page 3 of 3

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