Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Slider/Carousel with center fade on – yet controlled by null-movement

  • Slider/Carousel with center fade on – yet controlled by null-movement

    Posted by Manuel Moellmann on February 21, 2023 at 3:29 am

    Hey guys,
    right now, I cant really get my head around this. I hope one of you can help me. I bet its actually nothing crazy to change 😛

    I want to create a slider like this:
    https://i.imgur.com/pXhNNkB.gif

    I get how the code works and how to apply it to any kind of property, like in this case, the layers opacity:

    v = transform.position[0] // x  
    d = length(v,thisComp.width/2);
    maxDist= 960; ease(d,0,maxDist,100,0);

    Unfortunately, it only gets triggerd if every single “slider-element” / layer gets actually moved by changing its position. – I would like to have it work by using a null thats handling the movement from left to right while its the parent of all the slider-elements.

    Now, if i parent a layer to a null and move it by moving the null, its position-coordinates remain untouched. – Does anyone of you guys know, how i can make the null position affect the position-coordinates of each layer? Would be much appreaciated!

    View post on imgur.com

    Manuel Moellmann replied 3 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 21, 2023 at 3:54 am
    v = toComp(anchorPoint)[0]; 

    should give you the x position of the layer itself.

  • Manuel Moellmann

    February 21, 2023 at 4:06 am

    thank you dan! I already thought it had to be done by using one of the, for me still unfamiliar, “toComp…” variants. Thanks a lot! Its crazy to see how much effort you put into helping fools like me on the web. Great to have such an experienced and kind guy like you around!

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