FORUMS: list search recent posts

Syntax issue with taking a value from time

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Christopher Johnstone
Syntax issue with taking a value from time
on Jan 30, 2013 at 4:03:29 pm

Hi, I am having some problem getting an expression to work.
I believe my problem is my sytax:

I have plotted x and y values for a null in a separate comp.
the x value corresponds to the frame number
I want to grab the y value to a text layer when x = a given frame number

In my Source Text I have created an expression [see below]

Can anyone spot my mistakes and put me on the road to enlightenment?

Many thanks - C

t = comp("CNTL").layer("1").effect("1")("Slider");
value = Math.round(comp("Graph").layer("Null").transform.position[1].valueAtTime(t))


Christopher Johnstone


Return to posts index

Christopher Johnstone
Re: Syntax issue with taking a value from time
on Jan 30, 2013 at 4:16:14 pm

I have got it to work [see below] .. but I am still not happy with my botch job syntax
Is there a more elegant solution?

Many thanks - C

t = comp("CNTL").layer("1").effect("1")("Slider");
n = comp("Graph").layer("Null").transform.position.valueAtTime(t*0.04);
value = Math.round(n[1]);


Christopher Johnstone


Return to posts index

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