ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Elegant way (but not bullet proof)

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Elad Menashe
Elegant way (but not bullet proof)
on Mar 6, 2010 at 10:05:01 am

There are two ways to resolve the clock:
The first is using timeToTimecode (a built-in AE expression method)
Problem is it is bounded by 3 hours, each time above 3 hours will show 3:00:00:00
But the code is much simpler

The second option will be in the next message

startH = 1; // 21 will overflow
startM = 19;
startS = 20;
startF = 02;

timeShift = startH * 3600 + startM * 60 + startS + startF * thisComp.frameDuration;

framesPerSec = 1/thisComp.frameDuration;
timeToTimecode(t = time + timeShift, timecodeBase = framesPerSec, isDuration = false)




Posts IndexRead Thread 


Current Message Thread:
  • Clock by Jack Parks on Mar 5, 2010 at 8:51:09 am
    • Re: Clock by Jack Parks on Mar 5, 2010 at 11:28:08 am
    • Elegant way (but not bullet proof) by Elad Menashe on Mar 6, 2010 at 10:05:01 am
    • Less elegant but more robust by Elad Menashe on Mar 6, 2010 at 10:06:42 am





© 2020 CreativeCOW.net All Rights Reserved
[TOP]