ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Slider Position snapping with Checkbox control

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andy Seifried
Slider Position snapping with Checkbox control
on Sep 30, 2019 at 8:03:11 pm

Hey Gurus,

I've got a couple of tasks I'd like to create an expression to for. I have a null object that my text layer is attached to. To control the null's position I have a slider for both x and y positions. All this works, however, I'd like to limit the slider's range so that the X and Y values can not be moved past a certain point.

I've used the clamp expression for my first attempt and could only get the one of the range values to work. clamp(value,1348.5086,586.7971); for example.

What I'd like to do is use checkbox controls that automatically snap the position null to 4 different coordinates on screen. Does anyone have any suggestions or expressions to research that could pull this off?

Thanks,

Andy


Return to posts index

Andrei Popa
Re: Slider Position snapping with Checkbox control
on Oct 1, 2019 at 6:21:25 am

How do you choose the 4 positions? By proximity? You wish to activate/deactivate this behaviour with your checkbox?

Andrei
My Envato portfolio.


Return to posts index

Andy Seifried
Re: Slider Position snapping with Checkbox control
on Oct 1, 2019 at 3:25:31 pm

The positions are simply the 4 corners of the screen, bearing in mind the title safe area.


Return to posts index


Alex Printz
Re: Slider Position snapping with Checkbox control
on Oct 2, 2019 at 1:58:07 pm

Are you trying to snap on center (or anchorpoint) of your item layer or are you trying to snap outer edges, inner edges, etc.?

How are you going to stack checkboxes for more than one position? Does the first, or last, overpower the others?

How are you going to define the limit distances?


This is all do-able, but without more constraints it's tough to know where to go.

Alex Printz
Mograph Designer


Return to posts index

Andy Seifried
Re: Slider Position snapping with Checkbox control
on Oct 3, 2019 at 4:50:07 pm

Are you trying to snap on center (or anchorpoint) of your item layer or are you trying to snap outer edges, inner edges, etc.?

I'd like the center of the anchor point to guide the layer position. I want it to snap to the inner edges. (Factoring title safe regions)

How are you going to stack checkboxes for more than one position? Does the first, or last, overpower the others?

This is what I'm confused about. I really just want it to have a check box for each screen position. If it can't be done on the Expression Control layer, then how do I set that up?

How are you going to define the limit distances?
I'm probably doing this incorrectly, but I was using my x and y slider controls to move the null manually to the screen position. I took the corresponding values and tried to clamp the slider values to not go above or below a certain value.

I'm going to attach my project file. I'm working inside the "WorkingComp_Limits" comp.


Return to posts index

Andy Seifried
Re: Slider Position snapping with Checkbox control
on Oct 3, 2019 at 4:51:14 pm

13770_hwessgfxsetup.zip


Return to posts index

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