Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions movement control km/h or miles/h

  • movement control km/h or miles/h

    Posted by Alexandre Maye on April 11, 2016 at 12:07 pm

    Hi,

    A made a number text for a speed car control. Add a slider control to choose the speed of the car. But when my numbers go up 99 to 100 it’s change to 3 numbers and my text miles per hour (or km/h) don’t move to the side.

    So I would like to use a expression to say to my miles per hour to move when my number of speed go up to 99.

    I put some screenshot to see it.

    Thank you very much !

    Alexandre Maye replied 10 years, 4 months ago 2 Members · 8 Replies
  • 8 Replies
  • Miguel De mendoza

    April 11, 2016 at 3:30 pm

    In the paragraph tab, change your alignment to the right

  • Alexandre Maye

    April 11, 2016 at 4:35 pm

    Thank you,

    But I think you didn’t understand what I need.
    I got a expression slider for my numbers speed. From 0 to 99 if I put my KM/H next to the numbers it’s ok, but when I go up to 99 the numbers go with 3 decimals.
    So I would like to put in my expression or somewhere to say to my KM/H text to move to the right when it’s going behond 99.

    Do you see ? 🙂

    Thanks to anyone 🙂

  • Miguel De mendoza

    April 11, 2016 at 5:01 pm

    I see, write this on km/h position:

    speedValue = //Pickwhip to your slider
    offset = 50// tweek this to correct positioning
    x = (speedValue >= 100)? value[0] + offset: value[0];
    [x, value[1]]

  • Alexandre Maye

    April 12, 2016 at 8:32 am

    Hi,

    Thank you for your answer !

    I put your expression on position km/h and pick up my slider but nothing happend when I go up to 100…

  • Miguel De mendoza

    April 12, 2016 at 8:54 am

    Can you paste here the code from your project?

  • Alexandre Maye

    April 12, 2016 at 9:35 am

    speedValue = //thisComp.layer(“speed_(slider control)”).effect(“Slider Control”)(“Slider”)
    offset = 50// tweek this to correct positioning
    x = (speedValue >= 100)? value[0] + offset: value[0];
    [x, value[1]]

  • Miguel De mendoza

    April 12, 2016 at 9:42 am

    Ok, delete the “//” (comment) of the first variable:
    speedValue = thisComp.layer("speed_(slider control)").effect("Slider Control")("Slider");
    offset = 50;// tweek this to correct positioning
    x = (speedValue >= 100)? value[0] + offset: value[0];
    [x, value[1]]

  • Alexandre Maye

    April 12, 2016 at 9:45 am

    YES ! Thank you very much !

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