Activity › Forums › Adobe After Effects Expressions › Expression for opposing action
-
Expression for opposing action
Posted by Rob Hindley on April 13, 2008 at 10:06 pmI am wanting to slide a layer in one direction in one axis and want to link another layer to slide the opposite direction in the same action.
How is this written?
Dan Ebberts replied 18 years, 1 month ago 3 Members · 4 Replies -
4 Replies
-
Dan Ebberts
April 14, 2008 at 6:31 pmThere are several ways to do this, the simplest is probably to control the x positon (for example) of both layers with a slider control. One layer’s position property would get an expression like this:
value + [thisComp.layer(“control”).effect(“Slider Control”)(“Slider”),0]
The other would get this:
value – [thisComp.layer(“control”).effect(“Slider Control”)(“Slider”),0]
Dan
-
Rob Hindley
April 15, 2008 at 12:58 amThanks Dan. Works like a charm across the x axis.
How do I get it just to move in the y axis?
Gribble
::: Time flies like an arrow but fruit flies like a banana ::: -
Dan Ebberts
April 15, 2008 at 1:26 amLike this:
value + [0, thisComp.layer(“control”).effect(“Slider Control”)(“Slider”)]
and this:
value – [0, thisComp.layer(“control”).effect(“Slider Control”)(“Slider”)]
Dan
Reply to this Discussion! Login or Sign Up