4 Replies Latest reply on Apr 18, 2017 11:01 AM by cymande

    Changing targeted layername dynamically (Syntax issue)

    cymande Level 1

      Hi,

      I need to change targeted layer name dynamically.
      This is regular path name:

      thisComp.layer("layername").effect("...

      I want to change the path name like:
      thisComp.layer("layername"+ a value from a slider).effect("...

      When i add a value like:
      thisComp.layer("layername"+ 0).effect("...
      thisComp.layer("layername"+ 1).effect("...
      etc. it works.

      But when i try to write:

      x= thisComp.layer("sliderLayer").effect("nameValue")("Slider");
      thisComp.layer("layername"+ x).effect("...
      not working.

      Do i try an invalid operation.
      Or is there any way to execute it in CS5.

      Thanks