Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Why doesn’t the AE Numbers plug-in have commas???

  • Luc Nutter

    December 7, 2012 at 9:24 am

    Thanks for the script, Declan. It was exactly what I was looking for, and your posts helped me a lot!

    Cheers,

    Luc

  • Barry Rubin

    August 8, 2013 at 4:10 pm

    Can you further explain “first make sure your number is a string, then add from the .replace part as below:”

    Thanks Barry

    Love is great

    Barry R.

  • Jamie Buck

    February 13, 2014 at 7:49 pm

    Hi Declan,

    I am using the code you provided to put that includes the dollar sign in front of the number, but I was wondering if its possible to also include the 2 decimal places. ( i.e. $1,000.12)?

  • Declan Smith

    February 13, 2014 at 8:43 pm

    This thread lives again!

    The bit that is truncating the decimal point is where it says ‘toFixed(0)’. If you want two decimal places, then this needs to change to ‘toFixed(2)’. The full modified expression as below:

    "$" + (effect("Point Control")("Point")[0].toFixed(2)).replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");

    Declan Smith
    https://www.madpanic.tv
    After Effects CS6/ FCS3 / Canon XLH1 / Canon 7D / Reason / Cubase

    “it’s either binary or it’s not”

  • Liran Tabib

    April 22, 2016 at 7:15 am

    keeping this thread alive!
    if you are tired of programming your way out of counter animation you can use this Counter preset:https://www.vdodna.com/products/counter-preset/

  • Felipe Santamaría

    May 11, 2016 at 3:30 pm

    Hey Declan,

    I’ve used this code before for animated counters, so THANK YOU SO MUCH, but there’s somenthing I’ve been unable to do.

    Some times I’ve been asked to use commas to separate thousands and points to separate decimals (1,000.10), but sometimes I’ve been asked the opossite, to separate decimals with commas and thousands with points (1.000,10).

    How can I do this?

    Thank you for this code. This thread lives again!

  • Declan Smith

    May 11, 2016 at 5:55 pm

    Wow, this thread really does live on. Ok, if you want to do as you are saying, then try this. Basically, replace the “.” with “,” then add the separator as a “.”

    num = "$" + (effect("Point Control")("Point")[0].toFixed(2)).replace(".", ",").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1.");

    Hope this is what you’re after.

    Declan Smith
    https://www.madpanic.tv
    After Effects CS6/ FCS3 / Canon XLH1 / Canon 7D / Reason / Cubase

    \”it\’s either binary or it\’s not\”

Page 3 of 3

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