Highlighted

how to remove decimal value (.00) from slider control

New Here ,
Mar 08, 2015

Copy link to clipboard

Copied

Please ask me how to remove decimal value (.00) from slider control and add % (if possible) in after effects cs6.

I guess you mean to animate text with a slider.

Add a slider control (expression controls) to your text layer, and then, add this expression into your Source text:

x=Math.floor(effect("Slider Control")("Slider"));

x+" %"

that's all

Views

24.0K

Likes

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

how to remove decimal value (.00) from slider control

New Here ,
Mar 08, 2015

Copy link to clipboard

Copied

Please ask me how to remove decimal value (.00) from slider control and add % (if possible) in after effects cs6.

I guess you mean to animate text with a slider.

Add a slider control (expression controls) to your text layer, and then, add this expression into your Source text:

x=Math.floor(effect("Slider Control")("Slider"));

x+" %"

that's all

Views

24.0K

Likes

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
Mar 08, 2015 1
Most Valuable Participant ,
Mar 08, 2015

Copy link to clipboard

Copied

You can't.

Mylenium

Likes

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
Reply
Loading...
Mar 08, 2015 0
Adobe Community Professional ,
Mar 08, 2015

Copy link to clipboard

Copied

Precompose, then mask it out.

Likes

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
Reply
Loading...
Mar 08, 2015 0
New Here ,
May 28, 2019

Copy link to clipboard

Copied

I'm already triggered

Likes

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
Reply
Loading...
May 28, 2019 3
New Here ,
Mar 30, 2020

Copy link to clipboard

Copied

...

Likes

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
Reply
Loading...
Mar 30, 2020 0
New Here ,
Mar 08, 2015

Copy link to clipboard

Copied

I guess you mean to animate text with a slider.

Add a slider control (expression controls) to your text layer, and then, add this expression into your Source text:

x=Math.floor(effect("Slider Control")("Slider"));

x+" %"

that's all

Likes

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
Reply
Loading...
Mar 08, 2015 6
Adobe Community Professional ,
Mar 08, 2015

Copy link to clipboard

Copied

If you add this expression to an expression slider it will only return whole numbers.

math.round(value);

You will not be able to manually grab the slider control and make adjustments but you will be able to scrub through the values in the expression control and only end up with whole numbers.

Screen Shot 2015-03-08 at 10.48.44 AM.png

If you want to add a % sign to the slider control you can't do that, but if you want to use the slider to drive a text layer then francoisg32545302 has given you an expression that will work. It will help us a lot if we knew what you were trying to accomplish.

Likes

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
Reply
Loading...
Mar 08, 2015 1
Explorer ,
Sep 05, 2016

Copy link to clipboard

Copied

Rick, you can always write the "Value" before the "math.round", then you can change the digits straight from the effects control.

something like this:

value = Math.round(effect("Slider Control")("Slider"))

Ido.

Likes

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
Reply
Loading...
Sep 05, 2016 4
New Here ,
Mar 09, 2018

Copy link to clipboard

Copied

Hey thanks It worked for me...

Likes

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
Reply
Loading...
Mar 09, 2018 0
New Here ,
Mar 13, 2019

Copy link to clipboard

Copied

I use this and works too:

x=Math.floor(effect("Slider Control")("Slider"));

x+" "

I just delete the %

Likes

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
Reply
Loading...
Mar 13, 2019 1
New Here ,
Nov 10, 2020

Copy link to clipboard

Copied

Cleaner way is this, and you can change the number from zero to set decimal places...

effect("Slider Control")("Slider").value.toFixed(0) + "%"

Likes

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
Reply
Loading...
Nov 10, 2020 0
Adobe Community Professional ,
Nov 10, 2020

Copy link to clipboard

Copied

If you add an expression to the slider you lose the ability to use the slider in the effects control panel. If you use value.toFixed(0) or Math.round() in the property then the slider will still function in the effects control panel. 

Likes

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
Reply
Loading...
Nov 10, 2020 0