Hitarea (Movieclip.hitarea Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
The following ActionScript specifies that best quality anti-aliasing should be applied to the
SWF file.
my_mc._highquality = 2;
See also
_quality (MovieClip._quality property)

hitArea (MovieClip.hitArea property)

public hitArea : Object
Designates another movie clip to serve as the hit area for a movie clip. If the
does not exist or the value is
The value of the
hitArea
You can change the
hitArea
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 still detected as the hit area.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example sets the
clip. Place these two movie clips on the Stage and test the document. When you click
, the
circle_mc
square_mc
square_mc.hitArea = circle_mc;
square_mc.onRelease = function() {
trace("hit! "+this._name);
};
You can also set the
circle_mc
.
square_mc
circle_mc._visible = false;
See also
hitTest (MovieClip.hitTest method)
or
null
undefined
property may be a reference to a movie clip object.
property at any time; the modified movie clip immediately uses
movie clip as the hit area for the
circle_mc
movie clip traces that it was clicked.
movie clip
visible
,
_quality property
, the movie clip itself is used as the hit area.
property to
false
property
hitArea
movie
square_mc
to hide the hit area for
MovieClip
879

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF