Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression error in new CC2019 java script

  • Expression error in new CC2019 java script

    Posted by Hadi Kot on February 26, 2019 at 6:10 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};

    Hadi Kot replied 7 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 26, 2019 at 6:42 pm

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

    p

    Dan

  • Hadi Kot

    February 26, 2019 at 9:56 pm

    Thanks Dan for your reply, it work perfect ☺

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy