FORUMS: list search recent posts

loop in AND loop out

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Marc De Coster
loop in AND loop out
on Jun 22, 2010 at 9:50:42 am

Hi! New problem ...
I have a project where some layers rotate around a globe (it's not for me, it's for a training session I give!)
and here is my problem: I wrote an expression to loop my rotation loop_out("cycle",0) and, of course, it works. Now, I wanted to have the same rotation withe a loop in. So I added a line to my expression:

loop_in("cycle",0)
loop_out("cycle",0)

and it doesn't work. I have a loop in OR a loop out but I can't have them both on the same layer. May be I should add something between my two expressions?
Any ideas?

Thank u guys


Return to posts index

Michael Szalapski
Re: loop in AND loop out
on Jun 22, 2010 at 1:22:40 pm

;
You need ; after each line of code.

- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')

No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.


Return to posts index

Kevin Camp
Re: loop in AND loop out
on Jun 22, 2010 at 1:44:40 pm

what's happening is the last statement is the one that ae will execute. so, loop_out is the only one you will see.

what you'll need are some conditional statements that will make each statement get executed when certain criteria is met -- essentially, when time is less than when the rotation starts, loopIn; when it is after rotation ends, loopOut; if it is in between the keys, return the actual values...

something like this should work:

if (time=key(numKeys).time){
value;
}else{
if (timekey(numKeys).time) loopOut();
}



Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index


Kevin Camp
Re: loop in AND loop out
on Jun 22, 2010 at 1:59:27 pm

oops, part of the expression was removed due to the symbols...


lets try this again:

if (time < key(1).time) loopIn();
if (time >= key(1).time && time <= key(numKeys).time) value;
if (time > key(numKeys).time) loopOut();


that looks better, and it's a little simpler than the original


Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

Marc De Coster
Re: loop in AND loop out
on Jun 22, 2010 at 2:11:49 pm

Yessss it works!

Thank u. I thought it would have been easier but ... expressions are always a pain in the ....

However, I wouldn't have find it by myself so ... thank u


Return to posts index

Richard Thompson
Re: loop in AND loop out
on Aug 21, 2012 at 10:55:26 pm

Kevin that expression work is formidable. Really good stuff.

whilst messing around with the expression to understand how it works I found you can reduce your code slightly into this...


if (time < key(1).time) loopIn("continue");
else (value);
if (time > key(numKeys).time) loopOut("continue");


Return to posts index

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