-
Counter expression, split digits
Hi,
I am trying to create a 9 digit counter where the numbers are not displayed altogether, but rather spread across the comp.
What I need is an expression that controls my text layers based on selected digits of a number (generated by slider).
Originally I used
val = effect(”Slider Control”)(”Slider”);
numDec = 0; // digits to right of decimal
numDigit = 2; // digits to left of decimal
if (val < 0) sign = "-" else sign = ""; s = Math.abs(val).toFixed(numDec); while (s.length < numDigit + numDec + 1) s = "0" + s; sign + s from a post here somewhere, with an aim to simply creating masks around the appropriate digit on each text layer and spreading them about. However the client has chosen a non monospace font so the numbers were all wiggling about in and out of their masks as the numbers around them changed. To this end, if I could get a single digit per text layer, its position would remain pretty static. Can somebody help (Dan?) thanks.