Forum Replies Created

  • That’s awesome. Thanks so much. I went further and removed my scale expression and replaced it with this, allowing me more control over the layout.

    I applied an offset to the second and third layers – so now I have three layers that move around each other and scale all by adjusting and keyframing one control.

    Brilliant!

  • James Armstrong

    April 23, 2009 at 9:37 am in reply to: Counter expression, split digits

    Wow! I didn’t expect to get a response so fast! Thanks.

    I tried Dan’s expression out and came very close.

    The problem I had was that in figures with less digits than the number of layers, the digits are appearing in the wrong place.

    for instance if the slider was ‘1065’ the text layers said ‘1065_ _ _ _ _ ‘rather than’ _ _ _ _ _ 1065′
    So I just adjusted the digits to the left of the decimal place like so

    val = thisComp.layer(“Number Cruncher”).effect(“LAST6 digits”)(“Slider”);
    numDec = 0; // digits to right of decimal
    numDigit = 8; // 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; s = sign + s; s.substr(index-1,1) ...and Robert's your mother's brother! Now because the slider does not have enough digits to go up to numbers I need to show, I will create 2 pre comps controlled by 2 sliders in the main comp; one for the first 3 digits, one for the last 6. So far so good, and thanks again!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy