Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Syntax issue with taking a value from time

  • Syntax issue with taking a value from time

    Posted by Christopher Johnstone on January 30, 2013 at 4:03 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

    Christopher Johnstone replied 13 years, 8 months ago 1 Member · 1 Reply
  • 1 Reply
  • Christopher Johnstone

    January 30, 2013 at 4:16 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

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