Forum Replies Created

  • Tiberiu Stefanescu

    March 22, 2023 at 3:10 pm in reply to: Comma instead of dot – javascript

    Help me with something else:

    Let’s say i want to get rid of “percent” and instead to fill with some text that i enter in another “guide layer” .

    Someting like this:

    const textValue = thisComp.layer(“CONTROLS”).effect(“Text – Animated Value”)(1).value;

    const textNumOfDecimals = thisComp.layer(“CONTROLS”).effect(“Text – Number of Decimals”)(1).value;

    const textHigh = thisComp.layer(“CONTROLS”).effect(“Text – High Limit”)(1).value;

    const textLow = thisComp.layer(“CONTROLS”).effect(“Text – Low Limit”)(1).value;

    const textSize = thisComp.layer(“CONTROLS”).effect(“Text – Size”)(1).value;

    thisLayer.text.sourceText.style

    .setText((thisLayer.clamp(textValue, textLow, textHigh)/100).toLocaleString(“nl-NL”, {style: “percent”, minimumFractionDigits: textNumOfDecimals, maximumFractionDigits: textNumOfDecimals}) + thisComp.layer(“Text”).text.sourceText)

    .setFontSize(textSize)

    P.S.: i really need an java/ae expression course…

    Thx!

  • Tiberiu Stefanescu

    March 22, 2023 at 8:17 am in reply to: Comma instead of dot – javascript

    Thank you Filip!!
    It work very well. Also thanks for the nl_NL convention.

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