Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Setting horizontal position of a layer in one comp from null object in other comp

  • Setting horizontal position of a layer in one comp from null object in other comp

    Posted by David Lawrence on April 30, 2014 at 7:38 pm

    Hi All,

    I need help with a very simple expression:

    I want to use a null object in a comp as a simple slider to control the horizontal position of a targeted layer in a separate pre-comp.

    I used the pic whip on an expression for the position attribute of the layer I want to move and selected the X coordinate of my null object. This creates this expression:

    temp = comp("s7_LLangle3_stable_comp").layer("Null 1").transform.position[0];
    [temp, temp]

    The problem is that when I slide my null object, it changes both the X and Y position coordinates of my target. I only want X (the horizontal position) to change.

    What do I need to change in the expression so that it only affects the X position of my target layer? I’m sure it’s super simple and I’m already close.

    Thanks for your help!

    _______________________
    David Lawrence
    art~media~design~research
    propaganda.com
    publicmattersgroup.com
    https://lnkd.in/Cfz92F
    facebook.com/dlawrence
    twitter.com/dhl
    vimeo.com/dlawrence/albums

    David Lawrence replied 12 years ago 2 Members · 2 Replies
  • 2 Replies

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