Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesTrainingCreative Cloud DebateFAQ

How to get current frame in expressions.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
Cory WeinerHow to get current frame in expressions.
by on Apr 5, 2008 at 10:02:10 pm

I am trying to make the opacity of a video 0 on every even frame, and 100 on every odd. I have added an expression on the opacity of the video that looks like this:

d = thisComp.frameDuration;
if (d%2==0){
opacity = 0;
}else{
opacity = 100;
}

but this does not change the opacity of the video at any time.

how would I get the current frame number, then test every frame to see if it is even or odd and adjust the opacity accordingly.


Return to posts index
Reply   Like  

Dan EbbertsRe: How to get current frame in expressions.
by on Apr 6, 2008 at 12:47:27 am

See previous thread. :-)

Dan



Return to posts index
Reply   Like  

Stephen OberauerRe: How to get current frame in expressions.
by on Jul 21, 2012 at 12:05:27 pm

you could do this (where 25 is fps):

(time * 25) % 2 == 0


Return to posts index
Reply   Like  


Jan VorkRe: How to get current frame in expressions.
by on Nov 12, 2012 at 2:21:18 pm

For some reason, I get a rounding problem, where once in a while 2 frames get the same restult.

This expression works better for me:

C=((time*25)/2)-(Math.round((time*25)/2));
if (C==0)
{
100
}
else
{
0
}


http://www.jaydude.nl


Return to posts index
Reply   Like  

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSMAGAZINESTOCKYARDVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2013 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]