Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions need help with expression :)

  • need help with expression :)

    Posted by Alek Panfilov on October 17, 2005 at 4:55 pm

    hi all ,
    got some problem with expression , i’m not so good with math so maybe it’s very simple but i just can’t generate it with my brain 😛

    i need an expression that will generate randomly values 0 or 100.

    please help 🙂

    Alek Panfilov replied 20 years, 7 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    October 17, 2005 at 6:55 pm

    If you want it to change as fast as possible try this:

    Math.round(random())*100;

    If you want to slow it down try this (and adjust freq as necessary):

    freq = 5;
    if (wiggle(freq,10) < value) 0 else 100 Dan

  • Alek Panfilov

    October 18, 2005 at 10:29 am

    thank you Dan , it helped me out 🙂

  • Alek Panfilov

    October 18, 2005 at 10:53 am

    once again i have a Q about expressions,
    firt of all, in comp i have a slider wich is generating random numbers between 0 and 100 ,
    and also i have 8 solids, attached to objects in zaxwerks inv, and i want Z-3d-scale values of
    those solids to act like equalizer led, so i was thinking about expression for the Z-3d-scale
    of those solids wich will look something like this :

    temp = thisComp.layer(“slider”).effect(“Slider Control”)(“Slider”);
    temp2 = if(temp //HERE I DONT KNOW WHAT TO ENTER// = array (20, 100))100 else 0
    [100, 100, temp2]

    and now explanation to my heretical writings 😛
    i whant temp2 to be 100 when temp is in array between 20 and 100, when its below 20, temp2 is 0.

    i’m little lost in expression , so maybe it’s not properly wrighted, but way of thinking is good 😉

    cheers.

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