Special thanks to:
Dan Ebberts' "Obscuration using SampleImage()"
A good way to test it is to apply the "checkerboard" effect to a layer called "control" and then paste the expression into the second layer's opacity parameter. Manually move the target layer around the comp and it's opacity will switch between 0% and 100% depending on the control layer's alpha channel value at those co-ordinates.
Of course you don't have to reference the "control" layer's alpha channel, it can just as easily be one of the other channels.