Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Adding Commas to Point Control Expression

  • Adding Commas to Point Control Expression

    Posted by Eric Harvey on December 2, 2014 at 2:07 am

    Im utilizing the Point Control Expression because I need a counter that goes past one million. I have it rounding to whole numbers, but I can not get it to add commas. Below is my source text expression as it stands. Can anyone help me modify this to add commas?

    Thanks

    Math.round(effect("Point Control")("Point")[0])

    Eric Harvey replied 11 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Declan Smith

    December 2, 2014 at 1:36 pm

    Try the following:

    "" + Math.round(effect("Point Control")("Point")[0]).toFixed(0).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”

  • Eric Harvey

    December 2, 2014 at 5:24 pm

    Awesome, thank you.

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