After researching how to do this i found a tutorial with some code here...
Universal Up/Down After Effects Clock
with in this tutorial it shows this variable code
rate = -2;
clockStart = 3604.999;
function padZero(n){
if (n < 10) return "0" + n else return "" + n
}
clockTime = clockStart + rate*(time - inPoint);
if (clockTime < 0){
sign = "-"; clockTime = -clockTime;
}else{
sign = "";
}
t = Math.floor(clockTime);
hr = Math.floor(t/3600);
min = Math.floor((t%3600)/60);
sec = Math.floor(t%60);
ms = clockTime.toFixed(3).substr(-3);
sign + padZero(hr) + ":" + padZero(min) + ":" + padZero(sec) + "." + ms
and the code works by this analysis

No comments:
Post a Comment