Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects › Random fade error

  • Random fade error

    Posted by Steve Rood on January 13, 2014 at 8:04 pm

    Hi
    I am using Dans wonderful random fade code
    but when I put the project to CS6 from CS4
    I get:
    After Effects warning: invalid numeric result (divide by zero?) Expression disabled.
    error.
    Any suggestions truly welcomed _
    thanks!
    _ steve

    Here’s the code :
    seg_start_time = 0; //initial conditions
    seg_end_time = 0;
    i =1;
    tmin = 2; //minimum cycle time (can’t be zero)
    tmax = 3; //maximum cycle time
    while (time >= seg_end_time){
    i = i+1;
    seed_random(i,true);
    seg_start_time = seg_end_time;
    seg_end_time = seg_end_time + random(tmin,tmax);
    }
    percent = (time – seg_start_time)/(seg_end_time – seg_start_time);
    target_opacity = random()*50;
    seed_random(i-1,true);
    x=random(); //this is a throw-away value
    old_opacity = random()*50;
    ease(percent,old_opacity,target_opacity);

    John Cuevas replied 12 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • John Cuevas

    January 14, 2014 at 12:32 pm

    Try posting this in the AE Expressions Forum, probably get a quicker response.

    Johnny Cuevas, Editor
    Thinkck.com

    “I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work.”
    —THOMAS EDISON on inventing the light bulb.

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