Accurate Timer For Sports
hi all. i'm trying make expression apply text layer time sports videos accurately. far, have minutes , seconds figured out, can't seem milliseconds work. keep adding values past 100 dont want. whenever reaches 100 should start over.
milli = math.floor(time*100);
sek = math.floor(time%60);
min = math.floor(time/60);
if(sek<10)
{
"0" + min +":0" + sek + ":" + milli;
}
else
{
"0" + min +":" + sek + ":" + milli;
}
try this:
milli = "" + math.floor((time%1)*1000);
while (milli.length < 3) milli = "0" + milli;
sek = "" + math.floor(time%60);
if (sek.length < 2) sek = "0" + sek;
min = "0" + math.floor(time/60);
min + ":" + sek + "." + milli
dan
More discussions in After Effects Expressions
adobe
Comments
Post a Comment