ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Trigger layer to play forward from 0 on a particular slider value

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Benjamin ZauggTrigger layer to play forward from 0 on a particular slider value
by on Jan 18, 2015 at 7:26:09 am

Hi,

Hi, this is my first post. I hope somebody can help me out.

In my composition I have a precomposed layer sitting in my comp that I would like to play from frame 0 onwards whenever my slider hits 9.

It was easy enough for me to tell my animation layer to jump to frame 0 when triggered, but I have no idea how to get to it to play forwards from 0.

This is the code I have currently sitting in my layer's time-remap bit:


x = thisComp.layer("emoji ").effect("emojiRounded")("Slider");
if (x == 9){
0
}



So obviously it just jumps to 0 and stays there until the slider changes.

What I want is for it to jump to 0, then ignore the slider's continued "9" value in subsequent frames while it plays for 2 seconds. It would be good if it then could be triggered again after 2 seconds.


Ben.


Return to posts index

Walter SoykaRe: Trigger layer to play forward from 0 on a particular slider value
by on Jan 18, 2015 at 5:45:22 pm

Expressions are evaluated anew every single frame; they have no memory from frame to frame or knowledge of previous states.

To get the animation to play forward, you have to test not just for when to trigger a play cue, but also to test if it should be playing and if so, what frame it should be showing.

Check out this example:
http://www.motionscript.com/design-guide/marker-sync.html

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]