ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Countdown Timer in After Effects- Trying to remove the movement of digits

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Declan Smith
Re: Countdown Timer in After Effects- Trying to remove the movement of digits
on Jul 15, 2015 at 5:24:26 pm

Try the following. This will force a 2 digit pad on both minutes and seconds. The font will move it a little but each character location should be in a fixed position as per below:



function padZero(str) {
while (str.length < 2) {
str = '0' + str;
}
return str;
}

rate = -1;
clockStart = 900;
clockTime = Math.max(clockStart + rate*(time - inPoint),0);
t = Math.floor(clockTime);
min = padZero(''+Math.floor((t%3600)/60));
sec = padZero('' +Math.floor(t%60));
min + ":" + sec


Declan Smith
http://www.madpanic.tv
After Effects CS6/ FCS3 / Canon XLH1 / Canon 7D / Reason / Cubase

"it's either binary or it's not"


Posts IndexRead Thread 


Current Message Thread:





© 2019 CreativeCOW.net All Rights Reserved
[TOP]