Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Countdown clock expression error

  • Countdown clock expression error

    Posted by Andrew Ross on May 1, 2026 at 2:52 pm

    I could do with some help on this countdown clock please.

    I’ve got a script off the internet but it’s kicking up an error and I’m not sure why…

    This is the section of expression

    // Round to whole numbers and add zero padding

    for (i in f){ f[i] = String(Math.floor(f[i])).padStart(i>2?3:2, “0”) }

    and this is the error message

    The error reads : Error at line 17 ‘Source Text’ of layer 1(‘Timer’) in comp ‘Comp 17’. String ().padStart is not a function.

    w

    I hope you can help. Many thanks in advance.

     

    Dan Ebberts
    replied 2 days, 9 hours ago
    2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 1, 2026 at 3:09 pm

    Can you post the whole expression (or a link to where you got it)?

  • Dan Ebberts

    May 1, 2026 at 3:44 pm

    My guess, based on the error message, is that you have the expression engine set to Legacy Extendscript. Try:

    File > Project Settings > Expressions > JavaScript

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