Discussion:
simple question
(too old to reply)
M***@adobeforums.com
2006-08-09 20:39:06 UTC
Permalink
hello all

In AE 7, I have a composition with 2 layers, both the layers are just circles. With an expression I want to control the scale of the first layer (named "circle") with the position of the other layer (named "controller").

Right now I have this expression on the scale parameter of 'circle':
x=position;
y=thisComp.layer("controller").position;
vector=sub(point1, point2);
var=length(vector);
linear(var, 0, 100, [150,150], [50,50]);

It seems right to me, but AE says:
After Effects warning: variable expected.
Expression disabled.

Error occured at line 4.

I don't get it. Help would be much appreciated.
P***@adobeforums.com
2006-08-09 21:12:32 UTC
Permalink
Looks like "var" is a reserved word and you need to replace point1, point2 with x,y.

x=position;
y=thisComp.layer("controller").position;
distance=length(x,y);
linear(distance, 0, 100, [150,150], [50,50]);

Paul T
M***@adobeforums.com
2006-08-10 07:54:24 UTC
Permalink
you're right.
actually I changed some variable names because it didn't work, but i made a mistake.
thanks a lot

Loading...