ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

expression for setting positions with slider values?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Brennan Brinkley
expression for setting positions with slider values?
on Apr 11, 2017 at 5:25:24 pm
Last Edited By Brennan Brinkley on Apr 11, 2017 at 6:23:39 pm

So I'm trying to have the position of one of my layers change to specfic coordinates based on the values of my slider. this is the expression I wrote into the position transform but its not doing at all what I want:

eyeSlider = thisComp.layer("Head").effect("Slider Control")("Slider”);

if(eyeSlider > 0 && eyeSlider < 13) {
(0,0);
}

Keep in mind I have no idea if I'm even writing in the position coordinates correctly. I'm 90 sure thats not how you tell after effects to move a layer to a certain position.

Basically what I want to happen is the layer to move to the position 0,0 whenever the slider in somewhere between the values of 0 and 13.

Thanks a lot! Any input will help.


Return to posts index

Dan Ebberts
Re: expression for setting positions with slider values?
on Apr 11, 2017 at 7:24:38 pm

You have to put your position coordinates in JavaScript array format (square brackets) and your expression needs to define what happens if the condition is not met. This should work:


eyeSlider = thisComp.layer("Head").effect("Slider Control")("Slider");

if(eyeSlider > 0 && eyeSlider < 13) {
[0,0];
}else{
value;
}



Dan



Return to posts index

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