ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Random fade error

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
steve rood
Random fade error
on Jan 13, 2014 at 8:04:52 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);


Return to posts index

John Cuevas
Re: Random fade error
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
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.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]