ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Random fade error

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
steve roodRandom fade error
by on Jan 13, 2014 at 8:04:52 pm

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.
Any suggestions truly welcomed _
_ 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;
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;
x=random(); //this is a throw-away value
old_opacity = random()*50;

Return to posts index

John CuevasRe: Random fade error
by on Jan 14, 2014 at 12:32:17 pm

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

Johnny Cuevas, Editor

"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.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved