Usage 1: Compares the
instance, according to the
occupied by the instance on the Stage is evaluated, and if
is returned. This is useful for determining if the movie clip is within a specified hit or
true
hotspot area.
Usage 2: Evaluates the bounding boxes of the
they overlap or intersect at any point.
Example
The following example uses
whether the mouse pointer is over the target's bounding box:
if (hitTest( _root._xmouse, _root._ymouse, false));
The following example uses
the movie clip
square
if(_root.ball.hitTest(_root.square)){
trace("ball intersects square");
}
See also
MovieClip.getBounds()
MovieClip.lineStyle()
Availability
Flash Player 6.
Usage
my_mc.lineStyle([thickness[, rgb[, alpha]]])
Parameters
An integer that indicates the thickness of the line in points; valid values are 0 to
thickness
255. If a number is not specified, or if the parameter is
of less than 0 is passed, Flash uses 0. The value 0 indicates hairline thickness; the maximum
thickness is 255. If a value greater than 255 is passed, the Flash interpreter uses 255.
A hex color value (for example, red is 0xFF0000, blue is 0x0000FF, and so on) of the line.
rgb
If a value isn't indicated, Flash uses 0x000000 (black).
An integer that indicates the alpha value of the line's color; valid values are 0–100. If a
alpha
value isn't indicated, Flash uses 100 (solid). If the value is less than 0, Flash uses 0; if the value is
greater than 100, Flash uses 100.
Returns
Nothing.
510
Chapter 12: ActionScript Dictionary
and
coordinates to the shape or bounding box of the specified
x
y
setting. If
shapeFlag
with the
hitTest()
to determine if the movie clip
hitTest()
:
,
MovieClip.globalToLocal()
is set to
shapeFlag
and
overlap at any point, a value of
x
y
and specified instance, and returns
target
and
_xmouse
_ymouse
,
MovieClip.localToGlobal()
, a line is not drawn. If a value
undefined
, only the area actually
true
true
properties to determine
overlaps or intersects
ball
if
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?