FORUMS: list search recent posts

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Lawrence
Setting horizontal position of a layer in one comp from null object in other comp
on Apr 30, 2014 at 7:38:22 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
http://lnkd.in/Cfz92F
facebook.com/dlawrence
twitter.com/dhl
vimeo.com/dlawrence/albums


Return to posts index


Dan Ebberts
Re: Setting horizontal position of a layer in one comp from null object in other comp
on Apr 30, 2014 at 7:43:55 pm

Try changing the last line to:

[temp, value[1]]


Dan



Return to posts index

David Lawrence
Re: Setting horizontal position of a layer in one comp from null object in other comp
on Apr 30, 2014 at 7:46:31 pm

[Dan Ebberts] "Try changing the last line to:

[temp, value[1]]"


Perfect! Many thanks! :D

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]