SIGN IN
::
SPONSORS
::
ADVERTISING
::
ABOUT US
::
CONTACT US
FORUMS
TUTORIALS
MAGAZINE
STOCKYARD
VIDEOS
PODCASTS
EVENTS
SERVICES
NEWSLETTER
NEWS
BLOGS
ADOBE AFTER EFFECTS:
Home
Forum
Basics
Expressions
Tutorials
Podcasts
AE Techniques
Training
Creative Cloud Debate
FAQ
Re: radnom timeline marker
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
Re: radnom timeline marker
by
Dan Ebberts
on Oct 22, 2009 at 6:53:57 pm
OK - this is a fun one. Once you have all your layers sequenced, precompose them. Enable time remapping for the new pre-comp layer (don't change its name), and apply this time remapping expression:
myComp = comp(name);
n = myComp.numLayers;
seedRandom(index+101,true);
theLayers = [];
for (i = 1; i <= n; i++) theLayers[theLayers.length] = i;
for (i = 0; i < theLayers.length; i++){
idx = i + Math.floor(random(theLayers.length - i));
temp = theLayers[i];
theLayers[i] = theLayers[idx];
theLayers[idx] = temp;
}
accumDur = 0;
for (i = 0; i < n; i++){
myLayer = myComp.layer(theLayers[i]);
nextDur = myLayer.outPoint - myLayer.inPoint;
if ((time >= accumDur) && (time < (accumDur + nextDur))){
break;
}
accumDur += nextDur
}
i = Math.min(1,n-1);
myComp.layer(theLayers[i]).inPoint + time - accumDur
Dan
Posts Index
Read Thread
Reply
Like
Current Message Thread:
radnom timeline marker
by Dave Baum on Oct 22, 2009 at 1:11:38 pm
Re: radnom timeline marker
by Xinlai Ni on Oct 22, 2009 at 4:27:58 pm
Re: radnom timeline marker
by Dan Ebberts on Oct 22, 2009 at 6:53:57 pm
Re: radnom timeline marker
by Dave Baum on Oct 23, 2009 at 11:11:05 am
Re: radnom timeline marker
by Dave Baum on Oct 23, 2009 at 11:53:41 am
Re: radnom timeline marker
by Dan Ebberts on Oct 23, 2009 at 6:16:03 pm
Re: radnom timeline marker
by Dave Baum on Oct 26, 2009 at 9:50:47 am
Re: radnom timeline marker
by Dan Ebberts on Oct 26, 2009 at 1:51:15 pm
Re: radnom timeline marker
by Dave Baum on Oct 27, 2009 at 1:11:04 pm
Re: radnom timeline marker
by Dan Ebberts on Oct 27, 2009 at 4:04:08 pm
Re: random timeline marker
by Dave Baum on Oct 28, 2009 at 2:21:33 pm
Re: random timeline marker
by Dan Ebberts on Oct 28, 2009 at 2:55:50 pm
Re: random timeline marker
by Dave Baum on Oct 28, 2009 at 3:46:27 pm
LOGIN TO REPLY
FORUMS
•
TUTORIALS
•
MAGAZINE
•
STOCKYARD
•
VIDEOS
•
PODCASTS
•
EVENTS
•
SERVICES
•
NEWSLETTER
•
NEWS
•
BLOGS
© 2013
CreativeCOW.net
All rights are reserved. -
Privacy Policy
[
Top
]