Mouse listening across layers
I am having some troubles implementing mouse listening across layers.
I currently have a panel with 2 subpanels as children laying on top of one another. The first panel has an image while the second has a shape.
This image panel is clipped by a circle, and the shape panel adds a shape of a circle to give the clip a nice border and also has some other shapes drawn around the image in the blank area created by the clip.
I would like to add the functionality of allowing a user to draw a box on the image but if a corner is dragged past the limits of the circle the clipping circle will automatically take care of this. This means to me that I need a listener on the image layer to take care of several different types of mouse clicks, (click press, click release, etc) .
I also want to add a listener to the shape layer that does something else on a mouse click.
So far I can't get these to happen at the same time. If I have a listener on the shape layer which is above the image layer, the image layer doesn't hear, but if I turn off the listener on the shape layer the image layer works fine.
Does anyone have any suggestions?