Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Creating a Conditional Loop

  • Creating a Conditional Loop

    Posted by Randy Esulto on October 13, 2007 at 6:29 pm

    I’m hoping someone can help me do the following:

    I’m using Dan Ebberts’ Beat Counter ( https://www.motionscript.com/design-guide/audio-count.html ) in order to display various stills using his random stills expression ( slider = thisComp.layer(“Null 1”).effect(“Slider Control”).param(“Slider”)
    if(index == slider)100 else 0 ) applied to the layers’ opacity property.

    The thing is, I have fewer stills than there are beats in the audio, and what I would like to do is tell the beat counter to start counting again from “0” once “n = number of layers”

    I’m assuming that this will need to be done using a conditional loop, but I don’t know how to do it.

    Any help will be greatly appreciated.

    Thanks,

    Randy

    Randy Esulto replied 18 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 13, 2007 at 9:42 pm

    I’d just replace the last line with something like this:

    numberOfLayers = 10;
    n%(numberOfLayers +1)

    Dan

  • Randy Esulto

    October 13, 2007 at 9:44 pm

    Thanks Dan, I’ll give it a shot!

    Much appreciated,

    Randy

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