Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Number Counter linked to x-value

  • Number Counter linked to x-value

    Posted by Justin Giudici on June 7, 2012 at 5:58 pm

    I’m really stumped on this. I have a numbers layer that I want the value/offset to be linked to the x-value of another layer. I picked whip the value/offset to the position now how can I change the value of the numbers to what they are supposed to be. ie Start at 0 end at 378.9.

    Justin Giudici replied 13 years, 11 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    June 7, 2012 at 6:25 pm

    I’m not sure you’ve provided enough information, but maybe something like this?

    x = thisComp.layer(“solid”).transform.position[0];
    linear(x,0,thisComp.width,0,378.9)

    Dan

  • Justin Giudici

    June 7, 2012 at 6:39 pm

    Sorry for the vagueness Dan, I’ll try and explain it a little better. I have a car that is stopping and a stopping distance number. I want the number to increase at the same speed as the car, so when the car is slowing down the number count slows down as well. Pretty much using the speed of the car to control the counter speed.

  • Dan Ebberts

    June 7, 2012 at 6:47 pm

    You haven’t said what car x positions correspond the the start and end numbers, but it’s probably going to look like this:

    x = thisComp.layer(“car”).transform.position[0];
    carStart = 100;
    carStop = 500;
    numStart = 0;
    numStop = 378.9;
    linear(x,carStart,carStop,numStart,numStop)

    Dan

  • Justin Giudici

    June 7, 2012 at 6:58 pm

    That is exactly what I needed thanks for the help Dan!

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