ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Change the current value of a object

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Paul Jurgens
Change the current value of a object
on Feb 22, 2017 at 10:27:55 am

Hi!

I have a problem regarding expressions, i have searched the forum and all the corners of the internet but can't seem to find a solution:

So, I have a shape layer which I can change the width of trough a slider control, and I want to connect my text layer to it to change his position with it. But when I do that my text layer jumps outside of my composition. Is there an expression to keep my text layer in the same place as it is now and change it from there?

(So current position + (or -) slider control value).

Thank you in advantage!

// I currently use this line of code
temp = thisComp.layer("„").effect("Slider Control")("Slider");
[value[0], temp];


Return to posts index

Dan Ebberts
Re: Change the current value of a object
on Feb 22, 2017 at 5:03:33 pm

Try it this way:

temp = thisComp.layer("„").effect("Slider Control")("Slider");
value + [0, temp];


Dan



Return to posts index

Paul Jurgens
Re: Change the current value of a object
on Feb 23, 2017 at 9:04:07 am

Thanks! It now only changes the X, but I only want to change the Y of the position. Is that also possible that it only changes the Y side?


Return to posts index


Dan Ebberts
Re: Change the current value of a object
on Feb 23, 2017 at 5:19:24 pm

I'm not sure what you mean. That expression should only be affecting the Y value.

Dan



Return to posts index

Paul Jurgens
Re: Change the current value of a object
on Feb 23, 2017 at 6:01:53 pm

It only moves horizontal, but I want it only want to make it move vertical through the expression.


Return to posts index

Dan Ebberts
Re: Change the current value of a object
on Feb 23, 2017 at 7:42:15 pm

There must be some parenting and/or rotation going on, but try it this way:

temp = thisComp.layer("„").effect("Slider Control")("Slider");
value + [ temp,0];

Dan



Return to posts index

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