ActionScript 3 Working with Geometry Determine if a point is inside a rectangle area


Example

You can test whether a point is inside a rectangle using Rectangle.containsPoint():

var point:Point = new Point(5, 5);
var rectangle:Rectangle = new Rectangle(0, 0, 10, 10);

var contains:Boolean = rectangle.containsPoint(point); // true