Forum Replies Created

  • David Field

    January 22, 2013 at 6:20 am in reply to: Can a layer with a loop control the layers below it?

    Right you are – turns out inPoint and outPoint are (case sensitive) reserved words.

    Also functions can reference global variables, so you don’t need to specify arguments like in my example.

    Thanks!

  • David Field

    January 22, 2013 at 4:47 am in reply to: Can a layer with a loop control the layers below it?

    Ah, bollocks. Also, the music video’s been cancelled too, so it’s even worse. Silver lining in knowing what I can’t do though, so thanks.

    A quick question popped up while I was trying to clean up the code. I get “function inPoint is undefined” when AE interprets the following. Is there some kind of scope issue I haven’t run into yet? I’m pretty sure functions can’t use globals, hence the inputs named to avoid confusion, but I’m stumped on this snippet.


    function inPoint(cR, idx){
    if (cR > ((idx-2) * 100) ){
    return true;
    }else{
    return false;
    }
    }

    //Determines if the layer should be visible and sets the opacity accordingly [extra conditionals removed].
    if ( inPoint(camRate, index) && outPoint(camRate, index) ){
    //some code
    }else{
    fadeAmount = 0;
    }
    fadeAmount

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