Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Combining 2 Expressions

  • Combining 2 Expressions

    Posted by Patrick Schmid on February 6, 2023 at 11:39 pm

    Hi,

    im doing a a UI animation and i have to deal with a lot of numbers over 1.000.000

    so i tried to make a counter with a point Control which worked fine.

    but i also need the possibility of decimals…?

    with the second Expression i try to to change the font.

    can anybody please help me combine these two + the extra with the decimals 🙂

     

    1st Expression:

    num = Math.round(effect(“Point Control”)(“Point”)[0]);

    function addCommas(x) {

    return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g,”,”);

    }

    addCommas(num)

     

    2nd Expression:

    var fontArray=[

    “BerninaSansOffc-Regular”,

    “DTFlowTextV1.011-Regular”

    ]

    v=Math.round(thisComp.layer(“Null 19”).effect(“Font CTRL”)(“Slider”))

    style.setFont(fontArray[v]);

     

     

    Chris Scalzo replied 3 years, 3 months ago 3 Members · 2 Replies
  • 2 Replies

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