FORUMS: list search recent posts

Limiting numbers after decimal point

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Justin Giudici
Limiting numbers after decimal point
on Sep 11, 2012 at 12:59:45 pm

Hey everyone, I'm working on a number counter linked to a tracker and want it to just show one number after the decimal(193.4). It worked with Text>Numbers effect but you can't change the font. I was messing with the .valuetoFixed() but couldn't get it to work. Thanks for the help.

x=thisComp.layer("tracker2").transform.position.[0];
carStart = 0;
carStop = 800;
numStart = 1;
numStop = 195.4;
ease(x,carStart,carStop,numStart,numStop);


Return to posts index

Klemens Hertha
Re: Limiting numbers after decimal point
on Sep 11, 2012 at 1:12:29 pm

I once knew how to do this with expressions but I forgot... ;-)
But why can't you change the font with the numbers effect?? When you apply the effect to a layer, the first thing you are asked for is the font! Alternatively you can click on "options" in the effects panel!

Regards,
Klemens


Return to posts index

Justin Giudici
Re: Limiting numbers after decimal point
on Sep 11, 2012 at 1:15:04 pm

Klemens you are correct, the little things you always overlook. Thanks


Return to posts index


Dan Ebberts
Re: Limiting numbers after decimal point
on Sep 11, 2012 at 1:14:02 pm

Try changing the last line to this:

n = ease(x,carStart,carStop,numStart,numStop);
n.toFixed(1)


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]