MovieClip.hitArea
Availability
Flash Player 6.
Usage
my_mc.hitArea:Object
Returns
A reference to a movie clip.
Description
Property; designates another movie clip to serve as the hit area for a movie clip. If the
property does not exist or is
value of the
hitArea
You can change the
the new hit area behavior. The movie clip designated as the hit area does not need to be visible; its
graphical shape, although not visible, is hit-tested. The
prototype object.
Example
The following example sets the
clip. Place these two movie clips on the Stage and test the document. When you click
the
movie clip traces that it has been clicked.
square_mc
square_mc.hitArea = circle_mc;
square_mc.onRelease = function() {
trace("hit! "+this._name);
};
You can also set the
.
square_mc
circle_mc._visible = false;
See Also
MovieClip.hitTest()
or
null
undefined
property may be a reference to a movie clip object.
property at any time; the modified movie clip immediately takes on
hitArea
circle_mc
movie clip
circle_mc
, the movie clip itself is used as the hit area. The
hitArea
movie clip as the hit area for the
property to
visible
false
hitArea
property can be read out of a
square_mc
circle_mc
to hide the hit area for
MovieClip.hitArea
movie
,
533
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?