Highlighted

Expression not working...

New Here ,
Oct 27, 2018

Copy link to clipboard

Copied

Jay here; had what I found to be a galvanizing idea to morning. Unfortunately I have been hinder in the creative follow by a dysfunction I have not been able to work around. Setting up my normal null switch control I applied a checkbox function to control on/off of several layers in the comp. But it isn't working; here is what I applied to opacity:

if (thisComp.layer("SubCN_Hydrogen").effect("On/Off")("Checkbox")==1) 100 else 0;

it makes sense to me that this bit should give me on off functionality at the "SubCN_Hydrogen" layer. But it is not working. Please tell me why...!

Jay

Views

1.7K

Likes

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

Expression not working...

New Here ,
Oct 27, 2018

Copy link to clipboard

Copied

Jay here; had what I found to be a galvanizing idea to morning. Unfortunately I have been hinder in the creative follow by a dysfunction I have not been able to work around. Setting up my normal null switch control I applied a checkbox function to control on/off of several layers in the comp. But it isn't working; here is what I applied to opacity:

if (thisComp.layer("SubCN_Hydrogen").effect("On/Off")("Checkbox")==1) 100 else 0;

it makes sense to me that this bit should give me on off functionality at the "SubCN_Hydrogen" layer. But it is not working. Please tell me why...!

Jay

Views

1.7K

Likes

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
Most Valuable Participant ,
Oct 27, 2018

Copy link to clipboard

Copied

Your code is poorly formatted. It helps to adhere to proper JavaScript notation and use sway brackets, especially with the new engine in CC 2019. Also explicitly address the value of the property:

if (thisComp.layer("SubCN_Hydrogen").effect("On/Off")("Checkbox").value == 1) {100} else {0};

Mylenium

Likes

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
Reply
Loading...
mpisano LATEST
New Here ,
Apr 27, 2020

Copy link to clipboard

Copied

Hi! I have used this slider expression when wanting to change multiple postions/scales/oppacity etc. in AfterEffect CC 2017/2018 with no issue, but having issues in CC2019 here's what I have:

align=thisComp.layer("MASTER CONTROLS").effect("Screen Format")("Slider");

if(align==1) [60.0,60.0]; i

f(align==2) [332.0,60.0];

if(align==3) [1594.0,60,0];

I'm getting an error message saying "Error undefined value used in expression (could be an out of range arrange script?)"

I'm wondering what I'm doing wrong. Any help woulf be greatly appreciated! Thanks!

Likes

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
Reply
Loading...
Adobe Community Professional ,
Oct 27, 2018

Copy link to clipboard

Copied

AE CC (Oct 2018 Release) uses Javascript as the default Expression Engine. This requires the use of braces for conditionals and most other use-cases. FWIW, you can revert to the legacy Expression Engine via the Project Settings dialog. However, take note that for the vast majority of use-cases, the Javascript Expression Engine provides for better performance.

Likes

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
Reply
Loading...
New Here ,
Oct 29, 2018

Copy link to clipboard

Copied

Thank you.Sent via the Samsung Galaxy Tab E, an AT&T 4G LTE tablet

Likes

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
Reply
Loading...