ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression error although expression works

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Scott McGee
Expression error although expression works
on May 24, 2018 at 9:31:28 am

I get an error saying that speed149, or speed19. I'm guessing it's doing something based on the frame.

Even though the expression works fine, I don't understand why this is flagging an error. Anyone got an explanations as I'm struggling.

c = Math.floor(time);

if (c > 0 || c &lt; 2){
speed1 = 100;
speed2 = 150;
eval("speed" + c);

} else text.sourceText;



Return to posts index

Dan Ebberts
Re: Expression error although expression works
on May 24, 2018 at 1:13:29 pm

I'm not sure if this is what you're trying to do, but try it this way:


c = Math.floor(time);

if (c > 0 && c <= 2){
speed1 = 100;
speed2 = 150;
eval("speed" + c);

} else text.sourceText;



Dan



Return to posts index

Scott McGee
Re: Expression error although expression works
on May 24, 2018 at 1:48:46 pm

That fixed it, as soon as I saw the && part I thought. *facepalm*

Cheers that helped.


Return to posts index

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