Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Number Counter with Comma, changing comma size?

  • Number Counter with Comma, changing comma size?

    Posted by Jim Branstetter on May 13, 2017 at 6:37 pm

    Hi All,
    I am using the expression below. I can change the font, font color but it doesn’t allow me to change the size and baseline of the comma (which is huge with the font). The size changes are global, I can not select a character. Is there a way to change the comma size and baseline with a percentage? My attempts have failed.
    Thanks, Jim

    startCount = 0;
    endCount = 2000;
    countDur = 2;
    s = "" + Math.round(linear(time,0,countDur,startCount,endCount));

    if (s.length > 3){
    s.substr(0, s.length -3) + "," + s.substr(-3);
    }else{
    s
    }

    Jim Branstetter
    RubberBulletStudio.com

    Dan Ebberts
    replied 8 years, 11 months ago
    2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    May 13, 2017 at 7:10 pm

    You could try using a Scale and Position Animator set to offset values want for the commas, add an expression Selector with an amount expression like this:

    txt = text.sourceText;
    if (txt[textIndex-1] == “,”) 100 else 0

    Dan

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