Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Random Function in ExtendScript?

  • Xavier Gomez

    June 12, 2013 at 4:30 pm

    Math.random()

    – has no arguments
    – returns a number in [0,1[
    – there is also no counterpart of AE’s seedRandom() (hopefully wrong)

    Xavier

  • Nate Hanson

    June 12, 2013 at 4:44 pm

    Great! Thanks, Xavier!

    One more question – If I want to share my script with others, how can I make sure that the necessary math.js files travel with my script?

    Nate

    Nate Hanson
    Pilothouse Films

  • Xavier Gomez

    June 12, 2013 at 5:38 pm

    You mean you have some #include instructions (#include “file.jsxinc”)? If so, the simplest thing to do is to physically include external .js file in the main one and send just one file, unless you want to hide some part of the code…
    Sorry, not sure i understand.

    Xavier

    (Hmm, just realized that ‘#’ automatically creates a link. Not intentionnal.)

  • Nate Hanson

    June 12, 2013 at 5:41 pm

    You answered it perfectly, that’s exactly what I was wondering. So I will need to essentially copy and paste the necessary pieces of the library into my own script. That makes sense.

    Thanks, Xavier! I appreciate it!

    Nate

    Nate Hanson
    Pilothouse Films

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy