Right, so here's the scenario: I have 4 objects, A, B, C and D. What I want is that C obscures A, but not B. Similarly, I want D to obscure B, but not A. A and B can overlap each other in any order, it doesn't matter.
In other words, what I want is an object (C) to be able to cover one object (A) but not another (B), even if it comes into contact with it. Same with D, which can cover B but not A, even if it comes into contact with it. The problem is that I can't think of a layer configuration that allows this: D will always be higher than both A and B, and thus will obscure both.
I'm not expecting anyone to come up with some unfathomably clever configuration, but I'm wondering if there's some kind of ActionScript that can do this. In particular, I would like A and B to be dynamic TextFields, and C and D to be MovieClips of any shape (i.e. not a rectangle).
Hope this is possible!
You could use blitting, where you're not actually adding the items to the stage, but instead are using copyPixels() or draw() to draw the pixels. If you did this, then you could determine what parts of the objects would or would not be drawn. Check out this blog post for an overview of the technique http://www.developria.com/2010/02/dealing-with-bitmapdata.html.