Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Number counter

  • Number counter

    Posted by Pete Hutton on September 22, 2021 at 2:11 pm

    I’m looking for a workflow that will allow me to use several text boxes for 1 counter, so that the string all works together.

    I have this expression, however I can’t get it to work over several text boxes.

    var num = effect(“Slider Control”)(“Slider”); num = Comma(num);

    function Comma(number) { number = “$”+ ” + Math.round(number); if (number.length > 3) { var mod = number.length % 3; var output = (mod > 0 ? (number.substring(0,mod)) : ”); for (i=0 ; i < Math.floor(number.length / 3); i++) { if ((mod == 0) && (i == 0)) output += number.substring(mod+ 3 * i, mod + 3 * i + 3); else output+= ‘,’ + number.substring(mod + 3 * i, mod + 3 * i + 3); } return (output); } else return number; }

     

    Is there another workflow or something I’m missing. The reason I want to do this is that the font jumps around too much as the numbers aren’t mono spaced.

    Pete Hutton replied 4 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies

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