Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Text expressions

  • Posted by Marian-mina Mihai on August 8, 2011 at 7:28 am

    Hey guys. I would like to randomize the position of the words in a text and display it afterwards. The problem is that I’m not too familiar with AE Expressions, so basically what I would like to do is (everything with // is what I thought should work, but not in AE syntax:
    1. Define a string //var str = “one two three four”
    2. Split the string in words and place each word in a variable //selected = str.split(” “)[i];
    3. //for (i=0;i<=3;i++) {
    selected.position = x,y;
    display selected
    }

    Could you, please, tell me how can I achieve this? Or maybe an easier way? Is there any effect that does this and I’m just fooling around without knowing it? Thank you very much!

    Marian-mina Mihai replied 14 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    August 8, 2011 at 1:23 pm

    Here’s one way. Position your text layer to the upper left corner of your random range. Set your source text to “one two three four”. Add a position Animator. Set the Position offset so that it extends to the lower right corner of your random range. Add an Expression Selector. Delete the Range Selector. Change the Expression Selector’s Based On parameter to “Words”. Change the Amount parameter expression to this:

    seedRandom(textIndex,true);
    random([100,100])

    Dan

  • Marian-mina Mihai

    August 8, 2011 at 7:56 pm

    Thank you very much, exactly what I was looking for :D.

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