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

Checkbox Expression for Controlling Position

Community Beginner ,
May 02, 2018 May 02, 2018

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.

3.1K
Translate
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];

Translate
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];

Translate
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
LATEST

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

Translate
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