ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Checkbox Control - Lock x-position when checked

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mathias Kalhauge
Checkbox Control - Lock x-position when checked
on Mar 19, 2018 at 1:41:45 pm
Last Edited By Mathias Kalhauge on Mar 19, 2018 at 1:52:40 pm

I'm trying to make a graph, that can be easily re-used and modified. I'm trying to make it as easy as possible, but I've run into a problem.
I want to be able to lock the x-position of an object (but leaving the y-positiong changable) whenever the checkbox is checked. The problem is that I can't just write an if/else statement where the "if checked" is a specific value, because I want it to lock the last positional value, and not a predetermined one. I also don't know what to write at "else", that will allow me to move the object when the Checkbox Control is unchecked.
So basically I'm looking for an expression that allows me to lock the y-position value the object had before the box was unchecked.

I hope I explained this well enough.

if (thisComp.layer("CTRL").effect("Checkbox Control")("Checkbox")==1) 'I don't know what to put here' else 'or here'

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved