-
valueAtTime property gives “undefined” error
The goal is to vary an effect’s property using the layer’s horizontal velocity, caused by animating its anchor point.
My thinking is that the expression
transform.anchorPoint[0]-transform.anchorPoint[0].valueAtTime(time-(1/24))
Should give the horizontal velocity for the frame.
But while just
transform.anchorPoint[0]
or just
valueAtTime(time-(1/24))
don’t return errors,
transform.anchorPoint[0].valueAtTime(time-(1/24))
returns the error
“Function transform.anchorPoint[0].valueAtTime is undefined”What am I doing wrong?
transform.anchorPoint[0]-transform.anchorPoint[0].valueAtTime(time-(1/24))