Forum Replies Created

  • Terrance Schultz

    October 18, 2012 at 1:25 pm in reply to: Shatter image into the same but smaller images?

    @spencer Yeah I was attempting to get the graphic to blow up into many smaller graphics of the same thing.

    @Vishesh Is there a way to do this without purchasing trapcode? I should have put that in the first post.

    Thank you for your replies.

  • Terrance Schultz

    September 5, 2012 at 2:06 pm in reply to: Counter Expression with decimal mark

    this is what I found that helped me: I recently had a project where I needed a counter to go from 1 – 1,061.

    https://www.videocopilot.net/forum/viewtopic.php?f=5&t=17819

    taken from the above link:

    Formatting a number with commas

    1. Create a comp. Name it anything you like.
    2. Create a new text layer and name it “dummy” (this layer can be turned off; it feeds a number to the final text layer. I haven’t found a way around this; please let me know if there’s another way).
    3. Add a slider to the “dummy” layer (Effects > Expression Controls > Slider Control). After Effects should automatically name the slider control “Slider”
    4. Add an expression to Source Text of “dummy” (Animation > Add Expression).
    5. Pickwhip the expression to the “Slider” control from step 3.
    6. Create a second text layer. This will be the layer that displays the formatted number.
    7. Add an expression to Source Text of the new text layer. Replace the code with the following:

    var num = thisComp.layer(“dummy”).text.sourceText;
    num = Comma(num);
    [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;
    }

    Now try changing the value of the “Slider” control. Your visible text layer should reflect that number, now formatted with commas. Two catches: it only works for integers, and the slider tops out at 1,000,000. You should be able to pickwhip to any propery that contains a number (decimals are rounded off automatically).

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