I'm trying to make a vieport in which you can pan by dragging the background image around.
Here is what I've done: http://students.info.uaic.ro/~tudor.berechet/0sandbox/aperture/science/testing/fatChance.html
Note that I've hidden the mouse cursor and replaced it with 2 custom ones.
The problem is, the event attached to the background, which is a touch event, fires even when the mouse is over a sprite/movieclip (the monkey or the stats) that's in front of that background. And the stats isn't even in the gameLayer (where the monkey and the bg and the mouse cursors are). Try to drag the stats around, and see that the background and everything else pans with it (this is unwanted). Also, I need to remove the custom cursor and show the regular cursor whenever the mouse is NOT on the background (i.e. when it's on the monkey or stats or any new sprites I may/will have in the future).
Now I haven't used flash in a while, and I'm no expert in it to begin with, but is this normal behaviour for events to fire regardless if their sender is buried under other stuff?
How would I go about changing this behaviour?
PS: I've attached the source to the .swf in the link above.
[EDIT] Also, in case this has anything to do with anything, I'm using Starling for my GameLayer.
[EDIT2] It appears that I haven't made myself very clear. I only want the stage to be draggable IFF the mouse is Directly on the background. Whenever there's a sprite between the mouse and the background, the background event should NOT fire so I can change the cursor and interact with said sprite.