FORUMS: list search recent posts

Delayed start time of an expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chiara Napol
Delayed start time of an expression
on Jul 6, 2011 at 1:14:06 pm

Hi all!
I'm using this well-known expression :)

freq = 8.0;
amplitude = 15;
decay = 4;
amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time);


I applied it to the rotation property of one layer in my composition and I need it to start 2 seconds later the "0" frame of the composition… but I noticed it starts at the beginning of the composition and not at the beginning of the layer itself… I've been browsing the forum for hours trying to figure out how to do this! I've been trying this way…

timeToStart = 2;
if (time >= timeToStart){
t = time - timeToStart;
freq = 8.0;
amplitude = 15;
decay = 4;
amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time);
}else{
0;
}


but it is not working :(
I know another possibility could be using a marker, but I couldnt make it work as well!
Now I'm just looking for the quick&easy way, just writing in the expression in which sec it should start!
I know this question has been asked again and again, but it's my very first day handling expressions and my knowledge about coding is really basic! Hope you can help me..

Thank you!
Chiara


Return to posts index

Kevin Camp
Re: Delayed start time of an expression
on Jul 6, 2011 at 2:06:07 pm

in your second expression you are calculating a new time variable (t), but not using that variable in the calculation.

just change the word 'time' to 't' in the calculation:

amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

Chiara Napol
Re: Delayed start time of an expression
on Jul 6, 2011 at 2:15:52 pm

Thank you!

Chiara


Return to posts index


Alexander Welsh
Re: Delayed start time of an expression
on Feb 1, 2014 at 12:36:53 am

I am dealing with a simple swing expression tied to the x rotation. It starts immediately in the composition, but I'm trying to move it further into the comp. (Specifically, 4:08).

This has to be something really simple, and all over the internet, but apparently am not typing the right question.

I've toyed with some timeToStart commands, but they just end up cutting off the first portion of the animation and leaving everything after the timeToStart.

offset = 90;
swingMaxDistance = 100;
swingSpeed = 5;
easeTimeSpan = 2.5;
easeSpeed = 1;
easeVal = ease(time*easeSpeed, 0, easeTimeSpan, swingMaxDistance, 0);
Math.sin(time*swingSpeed) * easeVal;


Return to posts index

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