Skip to main content
Participant
May 2, 2018
Answered

Checkbox Expression for Controlling Position

  • May 2, 2018
  • 1 reply
  • 3335 views

Hi all,

I have a bit of a dilemma which Im trying to diagnose but having trouble (hence this post)

Im building out a template for my lower thirds and Im trying to add in a checkbox that will change the position of the lower third comp to move the comp higher when there are subtitles present. So the idea is that, I have subtitles in the video, in my essential graphics panel, I have a checkbox which when enabled, will move the comp higher. Here is the expression I have to far:

if thisComp.layer("CONTROL").effect("Checkbox Control")("Checkbox") ==true) (

transform.position(960,398)

}

else {

  transform.position(960,540))

}

Hope this helps. I effectively want to have it where when the checkbox is clicked, the position should be (960,398) and then when disabled, (960,540)

However, im getting errors and so Im turning to the community for guidance. Any feedback is welcomed!

Thanks.

    This topic has been closed for replies.
    Correct answer D.Basson

    Nevermind,

    I found a solution!

    if (thisComp.layer("CONTROL").effect("Checkbox Control")("Checkbox") ==1) [960,398] else [960,540];

    1 reply

    D.BassonAuthorCorrect answer
    Participant
    May 2, 2018

    Nevermind,

    I found a solution!

    if (thisComp.layer("CONTROL").effect("Checkbox Control")("Checkbox") ==1) [960,398] else [960,540];

    Participant
    August 13, 2024

    Also, after the "if" condition, break to the next line for the else condition or it will show an error.