Decreasing Digital timer error
Hi!
I've been trying to get a decreasing digital timer using expression.
This is what I have so far:
slider = thisComp.layer("TIME").effect("Slider Control")("Slider")
sec = slider%60;
min = Math.floor(slider/60)%60;
function addZero(n) {
if (n < 10) return "0" + n else return n;
}
addZero(min) + ":" + addZero(sec)
In order te have it decrease I have linked it to a startpoint slider:
Math.floor(thisComp.layer("CONTROL").effect("TIME")("Slider") - time*1)
This way I can send it als a mogrt. and I dont have to worry about it anymore.
This all works fine until it reaches a value below zero, after that is starts to go negative in the decimals.
For example: 0-1:0-3.
Are there any solutions to make it stop at 00:00?
