currently in my project i have a gradient ramp effect with the mosaic effect on top to create a pixelated horizontal gradient. I am attempting to have this layer effect the scale of another layer so as the gradient approaches zero, the other layer's scale drops to around 50%.
I have been attemping to do this with sampleImage however that only samples one point as opposed to continuously sampling all pixels.
SampleImage() can sample whatever area you want it to, including up to the full layer size/ comp size and averages the values. I suggest you actually read the online help on how to use it and what parameters it supports.