Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to change relative value

  • Expression to change relative value

    Posted by John Felt on July 31, 2009 at 7:40 pm

    Hello

    Quick question (perhaps) here. Is there a way for an expression to affect the relative position of something, rather than create an absolute position based on time?

    So for example I want the asset to jump 100 pixels to the left every second on the second. Rather than write out a time equation that bases the location on the time is there a way to say, “Every second move the asset 100 pixels to the left,” rather than say posterizeTime(1); position[0]-100*time?

    (The example is not really what I’m doing, if it were this simple then there would be no need)

    Thanks so much. I am sort of new to expressions, so all this help is hugely helpful.

    Thanks again
    John

    John Felt replied 16 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    July 31, 2009 at 8:22 pm

    Since expressions can’t pass information from one frame to the next, I think something like this is the best you’re going to do:

    value – [Math.floor(time)*100,0]

    Dan

  • John Felt

    July 31, 2009 at 8:27 pm

    That makes sense, thanks.

    John

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