Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Slider Position snapping with Checkbox control

  • Slider Position snapping with Checkbox control

    Posted by Andy Seifried on September 30, 2019 at 8:03 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

    Andy Seifried replied 6 years, 7 months ago 3 Members · 5 Replies
  • 5 Replies
  • Andrei Popa

    October 1, 2019 at 6:21 am

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

    Andrei
    My Envato portfolio.

  • Andy Seifried

    October 1, 2019 at 3:25 pm

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

  • Alex Printz

    October 2, 2019 at 1:58 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

  • Andy Seifried

    October 3, 2019 at 4:50 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.

  • Andy Seifried

    October 3, 2019 at 4:51 pm

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy