Skip to content

Instantly share code, notes, and snippets.

@aferriss
Created March 23, 2018 20:41
Show Gist options
  • Save aferriss/3bb9f3fe26c581b9ff130644c98d52f2 to your computer and use it in GitHub Desktop.
Save aferriss/3bb9f3fe26c581b9ff130644c98d52f2 to your computer and use it in GitHub Desktop.
Countdown timer expression in AE in minutes and secs
rate = -1;
clockStart = 420; // num seconds
function padZero(n){
if (n < 10) return "0" + n else return "" + n
}
clockTime = Math.max(clockStart + rate*(time - inPoint),0);
t = Math.floor(clockTime);
min = Math.floor((t%3600)/60);
sec = Math.floor(t%60);
min + ":" + padZero(sec)
@mahdigymboro1378
Copy link

idk why this isn't work for me because of the syntax problem
can anyone help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment