• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Expression Slider Control, when i had "%" it doesn't work anymore

New Here ,
Jan 02, 2025 Jan 02, 2025

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)Capture d’écran 2025-01-02 à 10.10.13.pngCapture d’écran 2025-01-02 à 10.10.31.png

TOPICS
Error or problem , Expressions

Views

105

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 02, 2025 Jan 02, 2025

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?

Votes

Translate

Translate
Community Expert ,
Jan 02, 2025 Jan 02, 2025

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2025 Jan 02, 2025

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 !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2025 Jan 02, 2025

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2025 Jan 02, 2025

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);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2025 Jan 02, 2025

Copy link to clipboard

Copied

LATEST

thank you soooo much, i have a lot to learn about the expressions in after effect ! Happy new year and have a great day 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines