MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference page 481

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Usage 2: Evaluates the bounding boxes of the
if they overlap or intersect at any point.
Parameters
x: Number
coordinate of the hit area on the Stage. The x and y coordinates are defined in the global
coordinate space.
shapeFlag: Boolean
entire shape of the specified instance (
parameter can be specified only if the hit area is identified by using
parameters.
target: Object
with the movie clip. The
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
- A Boolean value of
Boolean
otherwise.
false
Example
The following example uses
intersects the
square_mc
square_mc.onPress = function() {
this.startDrag();
};
square_mc.onRelease = function() {
this.stopDrag();
if (this.hitTest(circle_mc)) {
trace("you hit the circle");
}
};
See also
getBounds (MovieClip.getBounds method)
(MovieClip.globalToLocal method)
method)
The x coordinate of the hit area on the Stage.
A Boolean value specifying whether to evaluate the
), or just the bounding box (
true
The target path of the hit area that may intersect or overlap
parameter usually represents a button or text-entry field.
target
if the movie clip overlaps with the specified hit area,
true
to determine if the
hitTest()
movie clip when the user releases the mouse button:
,
localToGlobal (MovieClip.localToGlobal
and specified instance, and returns
target
circle_mc
,
globalToLocal
true
The y
y: Number
). This
false
and
coordinate
x
y
movie clip overlaps or
MovieClip
481

Advertisement

Table of Contents
loading

Table of Contents