Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Numbers or text expression with a ,

  • Tom Mont

    June 13, 2006 at 6:59 pm

    Please refer to
    https://forums.creativecow.net/cgi-bin/new_read_post.cgi?forumid=2&postid=880527
    Somehow the posts got mixed up.. i still having problems

  • Filip Vandueren

    June 13, 2006 at 7:50 pm

    the Slider Control can not be set beyond -1 and +1 million, the script still works though.

    You can get around it by using a Point Control Instead of a Slider, you only need the first value, so create a Point Control and change the first line to something like:

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

    (this assumes the Point Control is actually asigned to the Text-layer itself. You can just pickwhip to the first number of the Point’s co

  • Filip Vandueren

    June 13, 2006 at 8:00 pm

    I also fixed a bug were -xxxxxx would display as -,xxx,xxx:


    num=effect("Point Control")("Point")[0]; // use the first part of a point for more resolution than a slider

    numAsText= ""+num;
    dotIndex = numAsText.indexOf("."); // check for decimals
    if (dotIndex==-1) { dotIndex=numAsText.length; }

    formattedText = numAsText.substring(dotIndex-3,dotIndex+3); // +4 for 3 decimals etc.

    if (dotIndex>3) {
    for (i=dotIndex-3 ; i>0 ; i=i-3) {
    extractedText = numAsText.substring(i-3,i);
    if (extractedText=="-") {
    formattedText = extractedText + formattedText
    } else {
    formattedText = extractedText + "," + formattedText
    }
    }
    }

    formattedText;

  • Tom Mont

    June 13, 2006 at 9:51 pm

    Wow guys you are simply amazing. Thanks A lot

Page 2 of 2

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