The hitTest method in ActionScript 2 is how you check whether the mouse (or another object) is overlapping a movie clip. It’s essential for building interactive Flash content like buttons, drag-and-drop interfaces, or simple games.

Here’s a basic example that checks if the mouse is over a movie clip:

if (mc.hitTest(_root._xmouse, _root._ymouse, true)) {
  trace("hitTest Run");
}

The third parameter (true) tells Flash to use the shape of the movie clip rather than its bounding box. Set it to false if you just want bounding-box detection, which is faster but less precise.

You’d typically put this inside an onEnterFrame handler so it checks continuously. This was one of the most common patterns in AS2 game development.