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
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
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!
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.
Copy link to clipboard
Copied
Thank you.Sent via the Samsung Galaxy Tab E, an AT&T 4G LTE tablet
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more