Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scroll one layer opposite of the other.

  • Scroll one layer opposite of the other.

    Posted by James Huenergardt on October 29, 2014 at 10:29 am

    Hi,

    I’m animating a user interface and I’ve created a ‘scroll knob’ graphic that I want to be able to move up and down on Y and have a second layer scroll in the opposite direction but a little faster similar to how you scroll your web browser.

    It’s stumping me as I’m not great in math functions.

    I’m sure there’s some simple formula that can accomplish this.

    I tried if/else but couldn’t get that to work.

    Any help would be appreciated.

    Jim

    Reel Inspirations – http://www.reelinspirations.com
    Commercials, Dramas, Image Pieces, Documentaries, Motion Graphics

    James Huenergardt replied 11 years, 6 months ago 1 Member · 1 Reply
  • 1 Reply
  • James Huenergardt

    October 29, 2014 at 10:57 am

    OK, I found this:

    p = thisComp.layer(“A”).transform.position;
    value – [(p-p.valueAtTime(0))[0],0]

    But I need to be able to set the ‘initial’ value to something other than valueAtTime(0) or my layer jumps to a different location.

    Reel Inspirations – http://www.reelinspirations.com
    Commercials, Dramas, Image Pieces, Documentaries, Motion Graphics

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