Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Using Position of another layer to start fade in effect

  • Using Position of another layer to start fade in effect

    Posted by David Mathis on November 23, 2013 at 7:56 pm

    I would like for a bar to move in from left to right. When the bar reaches say a value of 960 for the x position I would like for the text to fade in. In other words I want only to keyframe the position of the lower third bar and not have to adjust keyframes for the opacity of text. There will be a “?” below in the expression somewhere. This indicates the area I am difficulty with.

    Would also like to create one so when the bar goes down the text will fade out.

    x = thisComp.layer("Lower Third Bar").transform.position[0];
    y = thisComp.layer("Lower Third Bar").transform.position[1];
    if (x>=960 && y<1080)
    then
    ?
    else
    ?

    Dan Ebberts replied 12 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    November 24, 2013 at 8:08 am

    If you want the fade to occur over a certain range of x positions of the bar, it might just be something like this:

    x = thisComp.layer(“Lower Third Bar”).transform.position[0];
    linear(x,960,1080,0,100)

    If you want to trigger a certain animation as soon as the x crosses 960, for example, that’s more complicated and requires an expression that can go back in time, frame by frame, to find the frame where the position went from less than 960 to greater than 960, then use the time since that event to drive your animation.

    Dan

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