I add a movieclip dynamically. At some point I draw the movieclip and place the bitmap within a MC inside the MC and add an Add filter to it. Later I give Drag functionality to such parent movieclips. I want the mouse to detect everything but the drawn bitmap. I already have the movieclip that contains the bitmap set to mouseEnabled false & mouseChildren false. But the bitmap is still detected by the mouse. When I set the parent to mouseEnabled = false, the parent no longer drags, so that doesn't work. When I set the parent to mouseChildren = false, nothing changes, the bitmap is still sensed. How can I leave the drawn bitmap visible, but have the drag functionality ignore the MC-encased bitmap?
So, after a bit of discussion we figured out the following:
Also along the way there was a problem of figuring the classes of the collected objects, the solution is pretty simple.
// We are in the root here.
addEventListener(MouseEvent.MOUSE_DOWN, onDown);
function onDown(e:MouseEvent):void
{
var aPoint:Point = localToGlobal(new Point(mouseX, mouseY));
var aList:Array = getObjectsUnderPoint(aPoint);
// Lets browse through all the results.
for each (var aChild:DisplayObject in aList)
{
// How to find if an object is an instance of certain Class.
if (aChild is Shape)
{
trace("A Shape was found under a name of", aChild.name, "!!!");
}
}
}