Activity › Forums › Adobe After Effects Expressions › 5 Minute Countdown
-
Dan Ebberts
January 31, 2009 at 9:05 pmTry this:
rate = -1;
clockStart = 300;clockTime = Math.max(clockStart + rate*(time – inPoint),0);
Math.ceil(clockTime)
Dan
-
Tina Ferguson
February 6, 2009 at 7:07 pmThis is great. Thanks for doing this.
I am curious if there is a way to change the font type of the numbers using this method.
-
Sylvia Katsarska
October 8, 2009 at 4:50 pmThis is exactly what I need but unfortunatelly when I paste it in expressions place it said that there is a mistake on line 6 and the expression is disabled
-
Dan Ebberts
October 8, 2009 at 5:40 pmWhich property did you paste it into, and what was the exact error message?
Dan
-
Michael Nguyen
November 30, 2009 at 10:29 pmhi,
I tried using this code but it seems its limited to an hour. i am trying to do a 2 hour countdown. is there something else i need to change besides the seconds?
-mike
-
Dan Ebberts
November 30, 2009 at 11:14 pmThere’s a lot of code in this thread. To which are you refering?
Dan
-
Michael Nguyen
November 30, 2009 at 11:17 pmthis one
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) -
Dan Ebberts
November 30, 2009 at 11:31 pmPlay around with this one:
rate = -1;
clockStart = 7200;function padZero(n){
if (n < 10) return "0" + n else return "" + n } clockTime = Math.max(clockStart + rate*(time - inPoint),0); t = Math.ceil(clockTime); hr = Math.floor(t/3600); min = Math.floor((t%3600)/60); sec = Math.floor(t%60); padZero(hr) + ":" + padZero(min) + ":" + padZero(sec) Dan -
Peta Kyle
January 20, 2010 at 5:30 pmI’m having the same issue with an error on line six. Did anyone ever find out what the problem was?
Reply to this Discussion! Login or Sign Up