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

Random text - dates.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
soovackRandom text - dates.
by on Sep 11, 2006 at 12:53:53 pm

Hello everyone.

I need to create a random calendar dates like '5 August', '16 January', '24 November' and so on. Day and month does not matter I need to generate them randomly and be able to control speed beetween changing source text. I need it to kinda fly through history and just stop at certain dates. I'm not very good at expressions so if anyone could help me I'd really appreciate. Hope I made myself clear, if there are any doubts, please tell me, I'll try to explain again.

All the best.
Tom


Return to posts index
Reply   Like  

MyleniumRe: Random text - dates.
by on Sep 11, 2006 at 2:00:47 pm

Apply a Slider expression control to your layer and rename it to "Randomizer". Then use something like this on the source text property of a text layer:



randomizer=thisLayer.effect("Randomizer)("Slider");
seedRandom(randomizer,true);

month_names=["January","March","August"];
month_ID=Math.round(random(0,month_names.length));
month_select=month_names[month_select];

day_names=["1","2","3"];
day_ID=Math.round(random(0,day_names.length));
day_select=day_names[day_select];

[day_select+" "+month_select]



This will create a new random combination whenever you change the slider value of the "Randomizer" (animate it to your taste). Fill in the other names as needed. For the fixed dates I'd simply hand-keyframe everything for simplicity's sake.

Mylenium

[Pour Myl


Return to posts index
Reply   Like  

Dan EbbertsRe: Random text - dates.
by on Sep 11, 2006 at 3:16:54 pm

I haven't tried it, but it seems like you'd want to use Math.floor() instead of Math.round() to avoid an out-of-range index.

Dan



Return to posts index
Reply   Like  


soovackRe: Random text - dates.
by on Sep 12, 2006 at 3:06:51 pm


Thank you, guys, you're awesome.

You're right Dan, there should be Math.floor() instead of Math.round() and there should be Month_ID and Day_ID in square brackets instead of Month_select and Day_select.

And can you recall any more precise method to control rate of change, cause slider is very unprecise, at most values it changes text every frame, and for example when set to 0,0 at frame 0 and 0,01 at frame 30 it changes every 2:05. It would be nice to have a slider correspond to frames, say every 1,0 at slider means one text change.


Return to posts index
Reply   Like  

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


FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

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

[Top]