Page 1 of 1

no random ?!?

Posted: March 19th, 2010, 6:15 am
by cardeiro
cant believe I've never noticed this before. There does not appear to be a random function in the scripting language. Is this true, or am I an idiot (I did search the entire manual for it)

Re: no random ?!?

Posted: March 19th, 2010, 8:52 am
by cardeiro
so heres the ugly hack I came up with. I create a slider on my layer, put an expression with a random number generator, read valueAtTime for the slider at frame 1, if I need another, read it at frame 2 and so on, then remove the slider.

ugly but it works...still cant beleive theres no random in aeScript.

Re: no random ?!?

Posted: March 19th, 2010, 10:23 am
by Dan Ebberts
Scripting has access to JavaScript's Math.random().


Dan

Re: no random ?!?

Posted: March 19th, 2010, 11:48 am
by cardeiro
Dan Ebberts wrote:Scripting has access to JavaScript's Math.random().


Dan

boy do I feel silly. thanks Dan, I was just calling random() like you can with expressions.