1. override
DisplayObject hitTestInput(num localX, num localY)

Evaluates this display object to see if the coordinates localX and localY are inside this display object.

If the coordinates are inside, this display object is returned; null otherwise.

localX and localY are relative to to the origin (0,0) of this display object (local coordinates).

Source

@override
DisplayObject hitTestInput(num localX, num localY) {

  localX = localX.toDouble();
  localY = localY.toDouble();

  DisplayObject hit;

  for (int i = _children.length - 1; i >= 0; i--) {
    var child = _children[i];
    var mask = child.mask;
    var matrix = child.transformationMatrix;

    if (child.visible && child.off == false) {
      num deltaX = localX - matrix.tx;
      num deltaY = localY - matrix.ty;
      num childX = (matrix.d * deltaX - matrix.c * deltaY) / matrix.det;
      num childY = (matrix.a * deltaY - matrix.b * deltaX) / matrix.det;

      if (mask != null) {
        num maskX = mask.relativeToParent ? localX : childX;
        num maskY = mask.relativeToParent ? localY : childY;
        if (mask.hitTest(maskX, maskY) == false) continue;
      }

      if (child is DisplayObjectContainer3D) {
        var point = new Point<num>(childX, childY);
        child.projectionMatrix3D.transformPointInverse(point, point);
        childX = point.x;
        childY = point.y;
      }

      var displayObject = child.hitTestInput(childX, childY);
      if (displayObject == null) continue;

      if (displayObject is InteractiveObject && displayObject.mouseEnabled) {
        return _mouseChildren ? displayObject : this;
      }

      hit = this;
    }
  }

  return hit;
}