ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Why ".valueAtTime()" doesn't work with [0]

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alexander Chekster
Why ".valueAtTime()" doesn't work with [0]
on Apr 4, 2017 at 9:13:38 am

Hi. Tell me why not working this code?

Without ".valueAtTime()" it expression works, but I want to add a delay before the animation.

//position
t = thisComp.layer(index-1).transform.scale[0].valueAtTime(time - .4);
x = linear(t, 0, -600, 0, 100);
[value[0] + x, value[1], value[2]];


Return to posts index

Dan Ebberts
Re: Why ".valueAtTime()" doesn't work with [0]
on Apr 4, 2017 at 5:23:51 pm

You have to do the array indexing after valueAtTime():

t = thisComp.layer(index-1).transform.scale.valueAtTime(time - .4)[0];


Dan



Return to posts index

Alexander Chekster
Re: Why ".valueAtTime()" doesn't work with [0]
on Apr 4, 2017 at 9:20:02 pm

Thank you, Dan!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]