-
“Illegal” variable names in expressions?
Hi guys. So this expression for Anchor Point works as expected when applied to a text layer, keeping the Anchor Point on the center right:
a = thisLayer.sourceRectAtTime(4);
H = a.height;
W = a.width;
T = a.top;
L = a.left;
[L+W,T+H/2]However, this expression does NOT work for some reason.
a = thisLayer.sourceRectAtTime(4);
height = a.height;
width = a.width;
top = a.top;
left = a.left;
[left+width,top+height/2]I suspect the problem is that certain words (“height” “width” “top” and “left” for instance) can’t be used as variables, but that’s just a guess. Anybody know what’s going on here? Thanks.