ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression error in new CC2019 java script

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hadi Kot
Expression error in new CC2019 java script
on Feb 26, 2019 at 6:10:01 pm

I have this expression

it's fully worked on the legacy expression but it give error on the new java script engine in CC2019 so how i can make it run on CC2019 please without changing to legacy format.

var x = thisComp.layer("Controller-Values-Colors").effect("Colums-Row-1-9")("Slider");
var p = transform.xPosition;
if(x==6) {p = 1920};
if(x==5) {p =1102};
if(x==4) {p = 760};
if(x==3) {p = 418};
if(x==2) {p = 77};
if(x==1) {p = -265};


Return to posts index

Dan Ebberts
Re: Expression error in new CC2019 java script
on Feb 26, 2019 at 6:42:33 pm

The expression didn't work for me in legacy or javascript until I added this line at the end:

p


Dan



Return to posts index

Hadi Kot
Re: Expression error in new CC2019 java script
on Feb 26, 2019 at 9:56:16 pm

Thanks Dan for your reply, it work perfect ☺


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]