### hitTest

Syntax: | `hitTest(sprite` `whichFlashSprite, point``)`
Type: | Function
Description: | This function indicates what part of a Flash movie is directly over a specific Director stage location. The Director stage location is expressed a Director point value; for example, point(100,50). The `hitTest` function returns these values:

| `#background` The specified stage location falls within the background of the Flash movie sprite.
| `#normal` The specified stage location falls within a filled object.
| `#button` The specified stage location falls within the active area of a button.

Example: | This frame script checks to see if the mouse is currently located over a button in a Flash movie sprite in channel 5 and, if it is, the script sets a text field used to display a status message.

    on exitFrame
    	if hitTest(sprite 5, point(the mouseH,the mouseV)) = #button then
    		set the text of member "Message Line" = "Click here to play the movie."
    		updateStage
    	else
    		set the text of member "Message Line" = ""
    	end if
    	go to the frame
    end

Previous | Next