FORUMS: list search recent posts

movement control km/h or miles/h

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alexandre Maye
movement control km/h or miles/h
on Apr 11, 2016 at 12:07:25 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 !






Return to posts index

Miguel de Mendoza
Re: movement control km/h or miles/h
on Apr 11, 2016 at 3:30:11 pm

In the paragraph tab, change your alignment to the right


Return to posts index

Alexandre Maye
Re: movement control km/h or miles/h
on Apr 11, 2016 at 4:35:05 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 :-)


Return to posts index


Miguel de Mendoza
Re: movement control km/h or miles/h
on Apr 11, 2016 at 5:01:43 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]]


Return to posts index

Alexandre Maye
Re: movement control km/h or miles/h
on Apr 12, 2016 at 8:32:19 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...


Return to posts index

Miguel de Mendoza
Re: movement control km/h or miles/h
on Apr 12, 2016 at 8:54:25 am

Can you paste here the code from your project?


Return to posts index


Alexandre Maye
Re: movement control km/h or miles/h
on Apr 12, 2016 at 9:35:24 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]]


Return to posts index

Miguel de Mendoza
Re: movement control km/h or miles/h
on Apr 12, 2016 at 9:42:02 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]]


Return to posts index

Alexandre Maye
Re: movement control km/h or miles/h
on Apr 12, 2016 at 9:45:58 am

YES ! Thank you very much !


Return to posts index

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