Hi,
First of all thank you very much Dan for this thread it’s really very helpful for the expression dummies like me. 🙂
I am doing a countdown for 5:00 and am having an error message on line 6 like 2 other people.
I am using your first expression: (on a text layer on which i wrote 5:00)
rate = -1;
clockStart = 300;
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)
I can't see what the problem is.
rate = -1;
clockStart = 300;
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)