Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Limiting numbers after decimal point

  • Limiting numbers after decimal point

    Posted by Justin Giudici on September 11, 2012 at 12:59 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);

    Justin Giudici replied 13 years, 8 months ago 3 Members · 3 Replies
  • 3 Replies
  • Klemens Hertha

    September 11, 2012 at 1:12 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

  • Dan Ebberts

    September 11, 2012 at 1:14 pm

    Try changing the last line to this:

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

    Dan

  • Justin Giudici

    September 11, 2012 at 1:15 pm

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

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