Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions importing numbered frames into AE?

  • Ben Wolfinsohn

    November 19, 2012 at 2:11 am

    wow, thats easy.
    thanks!

  • Ben Wolfinsohn

    November 24, 2012 at 8:01 am

    txt = “2,6,3,8,1,5,3,1,4,5,4,2”;
    f = timeToFrames(time);
    s = txt.split(“,”);
    parseInt(s[Math.min(f,s.length-1)])

    this script above you wrote works on the opacity of a solid. but when i try to apply it to a slider i attached to a null it gives me an error of –
    class ‘array’ has no property or method named ‘-1’

    when i turn on expressions for the slider it first looks like this before i put the script in –
    effect(“m-shape”)(1)

    thanks!

  • Dan Ebberts

    November 24, 2012 at 5:21 pm

    Try changing the last line to this:

    parseInt(s[clamp(f,0,s.length-1)],10)

    Dan

  • Ben Wolfinsohn

    November 24, 2012 at 5:57 pm

    works! thanks!

  • Ben Wolfinsohn

    November 24, 2012 at 6:49 pm

    in general, if you can have at the end of your expression ” == 8″ and you can have a ” < 1″ but can you have both with a “or”?

  • Dan Ebberts

    November 24, 2012 at 7:21 pm

    like this (it’s just core JavaScript):

    if((i == 8) || (i < 1))

    Dan

Page 2 of 2

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