Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Number of digits

  • Dan Ebberts

    October 23, 2017 at 8:41 pm

    Something like this:

    n = effect(“Slider Control”)(“Slider”);
    Math.round(n).toString().length;

    Dan

  • Kevin Camp

    October 23, 2017 at 8:57 pm

    this seems a little clunky, but i think it will work:
    s = " " + effect("Slider Control")("Slider").value;
    s.split(" ")[1].length;

    essentially you need to get the number value to be a text string rather than a number, then you can use length to return the number of characters (minus the space that we added to convert the slider value to a string)

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Pavol Feješ

    October 24, 2017 at 5:25 am

    Thanks for your refinement. Both are very clever. I’ve used Dan’s way and it works perfectly.

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