Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to randomly change color of characters

  • Dan Ebberts

    March 26, 2013 at 3:13 pm

    It should work fine in CS6 (in fact, I’m almost sure that’s where I tested it).

    Dan

  • Riccardo Sinti

    July 26, 2013 at 6:22 pm

    When I apply this expression to Fill Color RGB I get the warning:

    Class ‘global’ has no property or method named ‘textIndex’

    Am I not applying it to the right parameter?

  • Dan Ebberts

    July 26, 2013 at 6:32 pm

    That expression is for the Amount parameter of the Expression Selector. You should read the whole thread (if you haven’t already).

    Dan

  • Riccardo Sinti

    July 26, 2013 at 6:55 pm

    I still get “no property or method named ‘text index'”

  • Dan Ebberts

    July 26, 2013 at 6:59 pm

    You should be using textIndex

  • Riccardo Sinti

    July 26, 2013 at 7:01 pm

    I am. My typo was in the post not the expression.

  • Dan Ebberts

    July 26, 2013 at 7:08 pm

    How about posting the entire expression?

  • Riccardo Sinti

    July 26, 2013 at 7:55 pm

    Its this, from the thread:

    seedRandom(textIndex,true);
    palette = [[100,0,0],[0,100,0],[0,0,100],[0,100,100],[100,0,100],[100,100,0],[100,50,0]];
    // [red,blue,green,cyan,magenta,yellow,orange]
    idx = Math.floor(random(palette.length));
    palette[idx]

  • Dan Ebberts

    July 26, 2013 at 8:02 pm

    Hmm… I guess I’m stumped. If you have that pasted into the Amount property of your Expression Selector, you shouldn’t get that message. I just pasted in what you posted and it works for me.

    You will get that error though if you past an expression containing textIndex into any other property besides the Amount property.

    Dan

  • Riccardo Sinti

    July 26, 2013 at 8:05 pm

    Oh Well, thanks for your help today, always appreciated always a pleasure.

Page 2 of 5

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