Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions simple position and time offset using expressions not so simple

  • simple position and time offset using expressions not so simple

    Posted by Goodfear_la on April 5, 2006 at 12:32 am

    i am trying to animate the position of a bunch of solid layers. i have my first solid and i set 2 keyframes for the position. i added an expression to my next solid layer (layer size 300×300) and linked it to the position of my first solid and adding a transform of +300. this works fine but i would like to add an offset for the time so that the move happens 5 frames later.

    every time i try to add a value for the time i get an error and it wont work.

    here is my expression so far

    thisComp.layer(“Deep Red Solid 2”).transform.position +300.

    what do i need to do to make this happen 5 frames later? secondly if i add this same expression to the layer following that will the time and position of solid layer 3 be offset from solid layer 2 as long as i specify that layer in the (“layer”) variable?

    thanks in advance for your help and suggestions.

    Mylenium replied 20 years, 1 month ago 3 Members · 3 Replies
  • 3 Replies
  • Brian Charles

    April 5, 2006 at 2:09 am

    Use thisComp.layer(“Deep Red Solid 2”).position.valueAtTime(time +5)

  • Mylenium

    April 5, 2006 at 5:22 am

    [Brian Charles]
    Use thisComp.layer(“Deep Red Solid 2″).position.valueAtTime(time +5)”

    No, that’s wrong. This would offset the time by 5 seconds (since AE calculates based on time not on frames) and not 5 frames

    thisComp.layer(“Deep Red Solid 2″).position.valueAtTime(time + framesToTime(5))”

    Mylenium

    [Pour Myl

  • Mylenium

    April 5, 2006 at 5:55 am

    I forgot – layers can be offset using their index. So assuming your red solid is layer 1 (the topmost), all other layers can be offset using this:

    thisComp.layer(1).position.valueAtTime(time + framesToTime(5)*(index-1)

    Mylenium

    [Pour Myl

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