ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Undefined Value Used In Expression; Require assistance with Start Time Stop If Else Statement Wiggle But Keeping Same Aspect Ratio.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kyle Balitz
Undefined Value Used In Expression; Require assistance with Start Time Stop If Else Statement Wiggle But Keeping Same Aspect Ratio.
on Aug 27, 2019 at 2:35:28 am

Hello, I am trying to figure out an expression of using a Start and Stop time If Else statement using Wiggle. But I need to maintain the aspect ratio of the wiggle.
I tried to use the following syntax:

timeToStart = 6;
timeToStop = 16;
if ((time > timeToStart) && (time < timeToStop))
{ w = wiggle(5,10);
if (value[0]===0){[0, w[1]];}
else{[w[0], w[0]*value[1]/value[0]];};
}

But get an error that say Undefined Value used in expression (could be out of range array subscript?) at the
timeToStart = 6;

Could anyone help assist me on the correct syntax for this so I do not get this error. This maybe have to do with the update in After Effects 2019.



timeToStart = 6;
timeToStop = 16;
if ((time > timeToStart) && (time &lt; timeToStop))
{ w = wiggle(5,10);
if (value[0]===0){[0, w[1]];}
else{[w[0], w[0]*value[1]/value[0]];};
}


Return to posts index

Dan Ebberts
Re: Undefined Value Used In Expression; Require assistance with Start Time Stop If Else Statement Wiggle But Keeping Same Aspect Ratio.
on Aug 27, 2019 at 4:08:37 am

You didn't define what's supposed to happen outside the start and stop zone. Try replacing the last line:

}

with this:

}else value


Dan



Return to posts index

Kyle Balitz
Re: Undefined Value Used In Expression; Require assistance with Start Time Stop If Else Statement Wiggle But Keeping Same Aspect Ratio.
on Aug 27, 2019 at 5:38:47 pm

Wow Dan, that fixed it. Thanks for all the work you guys do here!


Return to posts index

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