• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

Checkbox Expression for Controlling Position

Community Beginner ,
May 02, 2018 May 02, 2018

Copy link to clipboard

Copied

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.

Views

2.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , May 02, 2018 May 02, 2018

Nevermind,

I found a solution!

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

Votes

Translate

Translate
Community Beginner ,
May 02, 2018 May 02, 2018

Copy link to clipboard

Copied

Nevermind,

I found a solution!

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 13, 2024 Aug 13, 2024

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines