-
For Loop Statement combined with Hover-Over Effect
Hi there!
I’m trying to make a hover-over effect activated by different shape layers. So each time one of the moving circles gets closer to the static circle layer, its size changes.
I managed to change the size but it only works with one shape layer, then the rest are ignored. I’ve attached a video for reference.
This is the expression that I used:
l = 0;
for( i=1; i <= thisComp.numLayers; i++){
curLayer = thisComp.layer(i);
if(curLayer.name.slice(0, 3) == “C_M” && curLayer.effect(“Circle Moving”)(“Fill Color”) == 1) {
pointA = curLayer.toComp(position)[1];
pointB = thisLayer.toComp(position)[1];
l = length(pointA, pointB);
s = ease(l,0,200,53,33);
}
}
[s,s]
What am I missing? Or is there a better way to achieve the same result?
Thanks!Mateo