-
Trouble With Creating A Rollover Properly
Hello friends! I’m still a bit new to expressions and I feel like I’m missing something obvious and can’t seem to figure out what it is. I’m trying to see if I can figure out how the kind of animation seen in this little loading type loop works: https://gyazo.com/f89a827d24bbf439220c714056445c27
I’ve managed to get the rollover effect working using this code
sMax = thisComp.layer("Center").effect("Scale")("Slider");
radius = thisComp.layer("Center").effect("Radius")("Slider");
a = thisComp.layer("Center").transform.position[1];
b = position[1];l = length(a, b);
s = ease(l, 0, radius, sMax, 0);
[s,s]Which I currently have looking like this in my comp: https://gyazo.com/a5858a36c50fb1f77837c0869a9ca535
The trouble is that while the shapes are scaling they aren’t sticking to the other shapes. In the original as the shapes scale, the edges where they touch never separate like they’re all in a chain with each other. In asking some other mograph friends they suggested using an expression I hadn’t heard of before called sourceRectAtTime and after trying to figure out how I would define it in my comp I can’t seem to work it out so they interact as expected. All I’ve got in my comp is a series of shape layers all in a row vertically and then the null passing over them doing the rollover with the above code. What am I missing to get them to be ‘linked’ to each other as they scale? I’m not quite sure how to get them each to reference each other right with sourceRectAtTime if that’s the right expression to be using here.
