Copy link to clipboard
Copied
Hey everybody,
I'm searching for a solution to the following problem:
I'm working on an kind of template for After Effects. It should be an After Effects woking file, where others can render some lower thirds from.
I want to use a slider to change the position of the text, so that the whole graphic is left, middle or right.
The slider already works on the position, so far so good. The problem is, that I want the slider to snap to the number, that the slider kind of jumps to the next round number, so that it isn't possible to position the slider between 0, 1 and 2. I already tryed Math.round(), Math.floor() and .value.toFixed, but it's not the final solution I was hoping for.
A script is not a solution, because it's way too complicated for the users.
Is there anything else I haven't found yet that could help me? Or is there a way to rename the position of the slider with 'left', 'middle' and 'right' instead of numbers?
Cheers, Elisa
If your company isn't letting you use the latest version with the Expression Dropdown meny controller (which, as @Mike_Abbott suggests, is the best way), you can use if/else expressions to make it snap to certain positions.
Math.floor should work. It is quite likely your Expression is not written as it should. If you post the Expression, in its entirety, someone may be able to assist you, to provide a solution.
Copy link to clipboard
Copied
Probably a better way to approach this would be with the new After Effects 'Dropdown menu control' expression controller.
You could use that to offer the three options: left, middle, right.
Rather than type out a whole list of instructions here, review this video for an intro:
Copy link to clipboard
Copied
If your company isn't letting you use the latest version with the Expression Dropdown meny controller (which, as @Mike_Abbott suggests, is the best way), you can use if/else expressions to make it snap to certain positions.
Copy link to clipboard
Copied
Sorry, I forgot to mention that I have to use AE 2018.
It works, nearly as I wanted it to.
But now I can only use the number in the slider effect to change the postion. The slider itself is grey and I can't move it manually. Did I do something wrong?
I wrote the if/else expression directly to the slider effect, I hope thats right.
Thanks a lot! You already helped me and I learned something new! 🙂
Copy link to clipboard
Copied
Math.floor should work. It is quite likely your Expression is not written as it should. If you post the Expression, in its entirety, someone may be able to assist you, to provide a solution.
Copy link to clipboard
Copied
Oh you're right. I alsways used Math.floor to round the number of the slider in the expression of the Position of my Nullobject. Now I've tried it for the slider effect itself as an expression and it worked!!! Yeay 🙂
Thank you so much!