Interface defining a hit area for pointer interaction. The hit area specifies
the region in which pointer events should be captured by a display object.
Example
// Create a rectangular hit area sprite.hitArea =newRectangle(0, 0, 100, 100);
// Create a circular hit area sprite.hitArea =newCircle(50, 50, 50);
// Custom hit area implementation sprite.hitArea = { contains(x:number, y:number) { // Custom hit testing logic return x >=0&& x <=100&& y >=0&& y <=100; } };
Remarks
Hit areas override the default bounds-based hit testing
Can improve performance by simplifying hit tests
Useful for irregular shapes or precise interaction areas
Common implementations include Rectangle, Circle, Polygon
Interface defining a hit area for pointer interaction. The hit area specifies the region in which pointer events should be captured by a display object.
Example
Remarks
See