Mailing List AE-List@media-motion.tv — Message #65600
From: Lloyd Alvarez <AE-List@media-motion.tv>
Subject: Re: [AE] long string of random nimbers
Date: Sat, 14 Sep 2019 14:51:35 -0400
To: After Effects Mail List <AE-List@media-motion.tv>
If you want an easier way you can just use Digit Fiddler:Β 

Lloyd


On Sat, Sep 14, 2019 at 2:48 PM David Torno <AE-List@media-motion.tv> wrote:
You are better off making a string of numbers instead of an actual number that will naturally hit limits as you’ve found.

If you want random then this should work...

//β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
var n = [β€œ0”,”1”,”2”,”3”,”4”,”5”,”6”,”7”,”8”,”9”];
var nLen = n.length-1;
var len = 100; //Length of final number
var result = β€œβ€;
for(var i=0; i <= len; i++){
Β  Β  Β result += n[Math.random(0, nLen)];
}

result;
//β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

My random syntax might be off, but give that a try.


David Torno
818.391.6060
--------------------
https://vimeo.com/davidtorno (experiments & breakdowns)
https://gumroad.com/davidtorno (products for sale)
http://provideocoalition.com/author/dtorno (tutorials)

"The most useless day is that in which we do not laugh"
-Charles Field

> On Sep 14, 2019, at 10:09 AM, Jim Curtis <AE-List@media-motion.tv> wrote:
>
> I’ve entered this expression on my Source Text applied to β€œ999999999999”.
>
> Math.round(random(99999999999999999999999999999999999999)*99999999999)
>
> At a certain point, Ae returns an exponential value, like β€œ...99999e +48”
>
> What I’m trying to get is a really loooooonnng string of animating random numbers with no decimal points.
>
> What am I doing wrong?Β  I’m an expression dummy.
> +---End of message---+
> To unsubscribe send any message to <ae-list-off@media-motion.tv>
>


+---End of message---+
To unsubscribe send any message to <ae-list-off@media-motion.tv>
--
Cheers, Lloyd
 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster