Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions combine 2 expressions

  • combine 2 expressions

    Posted by Jonas Espinoza on August 11, 2010 at 8:54 pm

    so this is a combo of something i was asking about yesterday

    I am being asked to make the objects bounce up and down once when they change color using the 2nd expression below which is in the color parameter of a fill effect, referencing a marker on a null.

    the problem is I already have the objects dropping in with the drop script below. I wonder if there is a way to add a variable, that changes the y value in the drop script so that the objects reference a new slider animation with the same delay and timing they are being effected by on the color script?

    does that make sense?

    //drop script
    t=time-inPoint;
    N=thisComp.layer(“dropper”);
    dropper=thisComp.layer(“dropper”).effect(“drop”)(“Slider”).valueAtTime(N.inPoint+t);
    ***b= thisComp.layer(“dropper”).effect(“bounce”)(“Slider”).valueAtTime(N.inPoint+t);
    d=(value[1]-dropper)-b;
    [value[0],d,value[2]]

    *** i added this but started thinking, it should be similar to the color script

    //color script
    L= thisComp.layer(“marker null”);
    delay = thisComp.layer(“dropper”).effect(“color delay controller “)(“Slider”);
    result = value;
    if (L.marker.numKeys > 0) {
    t = L.marker.key(1).time;
    if (time >= t) {
    if(Math.floor((time-t)/delay) + 1>= index){
    result = [1,0,0,1];
    }
    }
    }
    result

    Jonas Espinoza replied 15 years, 9 months ago 2 Members · 3 Replies
  • 3 Replies
  • Jonas Espinoza

    August 11, 2010 at 9:21 pm

    this is what i’m trying – not exactly doing anything…

    L= thisComp.layer(“marker null”);
    t=time-inPoint;
    m_t=L.marker.key(1).time;
    N=thisComp.layer(“dropper”);
    dropper=thisComp.layer(“dropper”).effect(“drop”)(“Slider”).valueAtTime(N.inPoint+t);
    delay = thisComp.layer(“dropper”).effect(“color delay controller “)(“Slider”);
    b = thisComp.layer(“dropper”).effect(“bounce”)(“Slider”).valueAtTime(m_t+(index*delay));

    d=(value[1]-dropper)+b;

    [value[0],d,value[2]]

  • Dan Ebberts

    August 11, 2010 at 9:50 pm

    It’s tricky. Can’t you just add the bounce to the end of the original slider animation?

    Dan

  • Jonas Espinoza

    August 13, 2010 at 12:00 am

    thats what i did. somehow i got it to work. had to pull out a piece of paper and really think through what was happening in the expression.

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