-
counter duration between two markers
pls!!! I need help… i need to modify this expression “duration” (“dur”) to duration between two markers duration.. sorry for my English…
That mean I need to count this counter from first marker to next marker….
(I need to modify 6th row “dur” for that)
can anyone give me suggestions…
pls help… Thank you…numDecimals = 0;
commas = true;
dollarSign = false;
beginCount = comp("Credits").layer("Lower Third Controller").effect("Begin Count Number")(1);
endCount = comp("Credits").layer("Lower Third Controller").effect("End Count Number")(1);
dur = comp("Credits").layer("Lower Third Controller").effect("Counter Duration")(1);t = time - inPoint;
s = linear (t, 0, dur, beginCount, endCount).toFixed(numDecimals);prefix = "";
if (s[0] == "-"){
prefix = "-";
s = s.substr(1);
}
if(dollarSign) prefix += "$";if (commas){
decimals = "";
if (numDecimals > 0){
decimals = s.substr(-(numDecimals + 1));
s = s.substr(0,s.length - (numDecimals + 1));
}
outStr = s.substr(-s.length, (s.length-1)%3 +1);
for (i = Math.floor((s.length-1)/3); i > 0; i--){
outStr += "," + s.substr(-i*3,3);
}
prefix + outStr + decimals;
}else{
prefix + s;
}