ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Trying to follow a tutorial, but stuck on expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam Dorsz
Trying to follow a tutorial, but stuck on expression
on Feb 17, 2019 at 9:17:46 pm

Hi,

I'm trying to create a 3D audio visualizer in AAF and I'm stuck on an expression error.

In the tutorial that I am following at around 1m30s, the guy copies an expression and inserts it into the position of a solid. I wrote down the expression and checked that it matches, but when I paste it in I get the 'expression result must be of dimension 2, not 1' error. I don't know anything about expressions and I have no idea what I'm doing wrong. Would be great if someone could help me out.

Thank you!







myEndTime = 0;
thisTime = time-thisLayer.inPoint;

segMin = 0.8; //minimum segment duration
segMax = 0.8; //maximum segment duration
minVal =[0.0];
maxVal =[10.99,6.99];

end = 0;
j = 0;
if (thisTime >= myEndTime) t = thisTime else t= myEndTime;
while (t>=end){
j+=1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
endVal = random(minVal,maxVal);
seedRandom(j-1,true);
dummy = random();
startVal = random(minVal,maxVal);

[Math.floor(startVal[0]), Math.floor(startVal[1])]*150+[40,40];


Return to posts index

Dan Ebberts
Re: Trying to follow a tutorial, but stuck on expression
on Feb 17, 2019 at 9:40:56 pm

I think to get it to work, you just need to add a semicolon to this line:

if (thisTime >= myEndTime) t = thisTime else t= myEndTime;

like this:

if (thisTime >= myEndTime) t = thisTime; else t= myEndTime;


Dan



Return to posts index

Adam Dorsz
Re: Trying to follow a tutorial, but stuck on expression
on Feb 17, 2019 at 9:58:05 pm

That works, thank you sir!


Return to posts index

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