Copy link to clipboard
Copied
Hi,
i'm looking for help about an expression for the effect slider,
when i'm using effect("Slider Control")("Slider").value.toFixed() it work
but as soon as i want to add a % at the end and use effect("Slider Control")("Slider").value.toFixed() + "%" the expression doesn't work at all anymore even just the start, does someone know how to resolve that ?
Thank you
(i'm putting screenshot for you to see, also english is not my first language so there may be errors)
Your screen shot isn't wide enough to show clearly, but it appears that maybe you added that expression to the Slider Control itself, rather than to the layer's Source Text property, is that correct?
Copy link to clipboard
Copied
Your screen shot isn't wide enough to show clearly, but it appears that maybe you added that expression to the Slider Control itself, rather than to the layer's Source Text property, is that correct?
Copy link to clipboard
Copied
Omg, thank you so much i was on it since yesterday i didn't understand and it was as simple as that !
Copy link to clipboard
Copied
and an other question if you know, is there a way that i can control de size of the "%" i add with the expression ? Thanks
Copy link to clipboard
Copied
Try this:
percentSize = 75;
txt = effect("Slider Control")("Slider").value.toFixed() + "%";
style.setFontSize(percentSize,txt.length-1,1).setText(txt);
Copy link to clipboard
Copied
thank you soooo much, i have a lot to learn about the expressions in after effect ! Happy new year and have a great day