Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

Re: accumulation

Cow Forums : Adobe After Effects Expressions
VIEW POSTS   •   ADD A NEW POST   •   SEARCH   •   CHANGE FORUM
Respond to this post   •   Return to posts index   •   Read entire thread


Re: accumulation
by Adrian Germain on Nov 2, 2009 at 1:57:19 pm

Ok. I have 3 keyframes with a loop expression . The value goes from 0(key1) to 100(key2) and it holds till the third keyframe.
what i want is to add this value to position of the null. i mean, each time the loop is beginning it adds the value to the position value at that moment(valueAtTime).So finnaly i will have 0-100, hold, 100-200, hold...and so on.I know expressions don't have memory so that's why i think it's about accumulation.
I was playing with this expression but it is adding each frame value to the previous one so when i have the hold keyframe it will add 100 on each frame.

Hope this time i was more clear.
Thanks.

accum = 0;
f = Math.round(time/thisComp.frameDuration);
for (i = 0; i <= f; i++){
t = i*thisComp.frameDuration;
accum += slider efect.valueAtTime(t);
}




Respond to this post   •   Return to posts index   •   Read entire thread


Current Message Thread:
  • accumulation by Adrian Germain on Oct 31, 2009 at 5:33:18 pm
    • Re: accumulation by Dan Ebberts on Oct 31, 2009 at 8:14:32 pm
      • Re: accumulation by Adrian Germain on Nov 2, 2009 at 1:57:19 pm




Note: If you are a registered user please click here to login before posting.

Your post will not be accepted if your name and email address are not registered in our database. Click here if you do not have an account.

Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message   Entire Thread   None  

Message:



Note: The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key. Read more...



Please post Expressions Code in the box below:


Add your message signature


 


Note: By clicking "Post Direct" button above, you are agreeing to the Creative Cow's Code of Conduct.



FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]