Intersecting animated masks As a quick demonstration, here's an illustration;



So I have two shapes (2 and 3), which intersect (4). I want to animate the position (possibly also scale) of these two shapes, while having footage masked inside each numbered area. The shapes should move independently of the footage.

I've gotten as far as masking the footage for 2 and 3, but the intersection is what makes me scratch my head. Is there a way to do this in After Effects CC without any hand-tooling for a mask for the intersecting area?
Simply copy the two animated masks to the 4th footage file and set them to "Intersect" instead of "Add". Then they will only reveal the footage that they are applied to when they intersect with another mask. Then put this footage files layer ontop of the others.

Here a screenshot as a reference.