get time at a value

Hi,
I know how to get a value at a time, but I want to get the time at a certain value, I have a layer A that has the scale sized from 0 to 100% by a sampleImage function from layer B, and I want it to fade out after it get to 100% scale, so I need to have the time where it happen(let's call this time value "st") to be able to do to opacity "100-(st-time)", example : A reach 100 scale at 50, so at this moment: opacity = 100-(50-50) = 100, and the more the time goes after that that more the A fade out, 100-50-60 ....

The best you can do is create a frame-by-frame loop that uses valueAtTime() to find the frame where the value reaches the threshold. You can start at the current frame and go backwards to find the most recent occurrence, or you can start at the earliest frame and go forwards to find the first occurrence. In either case you need to have logic to handle the possibility that it hasn't happened yet.

Hi,
Thanks Dan for your quick response.
However I can't do that my, the animation that trigger the other is automatic, no key-frames, it use sample image to see when to start, and I want to trigger the decrease animation when this scale one finish.

I'll try to tell it other way.

Is there a way to make a decrease animation other way than with x-time technique ?

I used the scale animation reach 100% at 0.9 instead of 1 and kept the 0.1 for the glow effect that I'm applying on the layer.

Amstane

s=thisComp.layer("Animation Guide"); // the layer with the wipe animation that will be sampled
sc=transform.scale[0]/100; // the scale depend already of the animation guide sampling from 0 to 0.9
scL=linear(sc,0.5,1,0,1); // to have the glow start at scale 50
v=s.sampleImage([transform.position[0],transform.position[1]],[.5, .5]); // sampling again nut from 0.9 to 1
e=layer("ANIMATION").effect("Assembling Glow")(1)*scL; // control the glow max value with a slider
ease(v[0],0.9,1,e,0) // While sampling goes from 0.9 to 1 the glow goes from e to 0

I know this thread is old but I have a similar problem and my knowledge of expressions is very basic. So any help greatly appreciated!

I have a layer which goes from point A to point B, for which I want to create a 1 second overshoot of sorts, so that when it reaches B it moves back a bit.

The movement is all automated with no keyframes as it's linked to reveal of a text, so I only have value of B and value after overshoot. I would like to use an Ease expression on it, but I'm missing how to make it last 1 second and start after layer arrives at B. Any thoughts?