Activity › Forums › Adobe After Effects Expressions › Random numbers
-
Random numbers
Posted by Göran Thorén on December 1, 2008 at 3:13 pmHi.
I can´t seem to find out how to accomplish this:I have two lines of text and I need this to display random numbers before it starts to display the original text character by character. I sthis possible at all?
Eric Sanderson replied 17 years, 5 months ago 3 Members · 8 Replies -
8 Replies
-
Eric Sanderson
December 1, 2008 at 4:30 pmYup, you dont even have to write an expression for it. Its done in your text “Animate” tab, the “character offset value”.
-
Göran Thorén
December 1, 2008 at 8:30 pmThank´s Eric but I need the characters to be numbers at first, the character offset only offsets the character. Any tip on how to display numbers?
-
Eric Sanderson
December 1, 2008 at 8:40 pmif you offset the value, 48-57 are numbers 0-9…but if you want a more controlled way you can just keyframe the “source text” from the numbers you want to the word you want, and maybe plug-in a random generator for the numbers.
-
Brian Berneker
December 1, 2008 at 11:59 pmI think I saw Eran Stern did a tutorial on this very effect. I think it was called Digits Man I and II.
-
Göran Thorén
December 2, 2008 at 8:17 amEric: The problem with keyframing source text is that it creates hold keyframes.
Brian: I watched Erans tutorials and unfortunately it´s just a text preset he uses and it´s not the effect I´m after.
-
Eric Sanderson
December 2, 2008 at 3:27 pmTo the "Source Text".. s="Testing"; n=effect("Slider Control")("Slider"); if(time<5){ n }else{ s } To the "Expression Slider"... random(1000000,9999999)Ya thats true, well i played around with it a little and found a solution. There are probably better ways of doing it, like using layer markers instead of time but this seemed to work fine if you know the time that you want the word to be its correct value. Add an expression slider to the text then this..
…And just replace the word Testing with whatever word you want, and the numbers in the random gen. just represent each character so since “Testing” is 7 characters long i made the number generate a random 7 digit number. And made the source text appear at 5 seconds. Is this more what you were looking for?
-
Göran Thorén
December 4, 2008 at 11:09 amThank´s Eric for your effort but I can´t get it your expression to work, no randomness at all.
My intention is a random scrambling line of numbers ex: “3625 7480 8427”
that transform to ex: “text more text” caharacter by character. -
Eric Sanderson
December 4, 2008 at 3:13 pmTo the "Source Text".. s="Test"; n=effect("Slider Control")("Slider"); if(time<5){ n }else{ s } To the "Expression Slider"... random(1000,9999)Lol, man this is becoming one serious thread. My fault on the last code…actually if you use the same code…but change the text to “test” like you want, and then make the random number 4 digits instead of 7 it will work. Thats actually how i originally did it and it worked, but when typing you i added the test”ing” and extra digits in case you used longer words and gave you some extra characters to play with, but i didnt realize that for some reason 7 digits is too many for AE. So if the 4 digits is all you need than you can use this.
Reply to this Discussion! Login or Sign Up