Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions question about replacing string contents/inserting a number into a string.

  • question about replacing string contents/inserting a number into a string.

    Posted by Ramon Peppelenbos on January 20, 2014 at 6:59 pm

    Hey guys!

    I got an expression question. Basically I want to change a number that’s in a string. I want to replace the number in the string with the layer index.

    Here is a screenshot for the explanation: https://i.imgur.com/ciuDzIj.jpg?1

    I’ve looked into some more advanced js for Ae, but I could’t find my awnser. Hopefully somebody can help me out.

    Thanks in advance.

    Regards,

    Ramon Peppelenbos

    Ramon Peppelenbos replied 12 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 20, 2014 at 8:04 pm

    I haven’t test it, but this should be close:

    thisComp.layer(“Controls”).effect(“Bar ” + index + ” color”)(“Color”)

    Dan

  • Ramon Peppelenbos

    January 20, 2014 at 8:16 pm

    Works like a charm! thank you so much!

    Regards,

    Ramon Peppelenbos

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