MovieClip.lineStyle()
587
Returns
A Boolean value of
true
if
my_mc
overlaps with the specified hit area,
false
otherwise.
Description
Method; evaluates the instance specified by
my_mc
to see if it overlaps or intersects with the hit
area identified by the
target
or
x
and
y
coordinate parameters.
Usage 1: Compares the
x
and
y
coordinates to the shape or bounding box of the specified
instance, according to the
shapeFlag
setting. If
shapeFlag
is set to
true
, only the area actually
occupied by the instance on the Stage is evaluated, and if
x
and
y
overlap at any point, a value of
true
is returned. This is useful for determining if the movie clip is within a specified hit or
hotspot area.
Usage 2: Evaluates the bounding boxes of the
target
and specified instance, and returns
true
if
they overlap or intersect at any point.
Example
The following example uses
hitTest()
to determine if the movie clip
circle_mc
overlaps or
intersects the movie clip
square_mc
when the user releases the mouse button:
square_mc.onPress = function() {
this.startDrag();
};
square_mc.onRelease = function() {
this.stopDrag();
if (this.hitTest(circle_mc)) {
trace("you hit the circle");
}
};
See also
MovieClip.getBounds()
,
MovieClip.globalToLocal()
,
MovieClip.localToGlobal()
MovieClip.lineStyle()
Availability
Flash Player 6.
Usage
my_mc
.lineStyle([
thickness:Number
[,
rgb:Number
[,
alpha:Number
]]])
: Void
Parameters
thickness
An integer that indicates the thickness of the line in points; valid values are 0 to
255. If a number is not specified, or if the parameter is
undefined
, a line is not drawn. If a value
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.
rgb
A hex color value (for example, red is 0xFF0000, blue is 0x0000FF, and so on) of the line.
If a value isn’t indicated, Flash uses 0x000000 (black).
Содержание FLEX
Страница 1: ...Flex ActionScript Language Reference ...
Страница 8: ......
Страница 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0 ...
Страница 76: ......
Страница 133: ...break 133 See also for for in do while while switch case continue throw try catch finally ...
Страница 135: ...case 135 See also break default strict equality switch ...
Страница 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while ...
Страница 229: ...while 229 i 3 The following result is written to the log file 0 3 6 9 12 15 18 See also do while continue for for in ...
Страница 808: ...808 Chapter 7 ActionScript for Flash ...
Страница 810: ...810 Appendix A Deprecated Flash 4 operators ...
Страница 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code ...
Страница 816: ...816 Appendix B Keyboard Keys and Key Code Values ...
Страница 822: ...822 Index ...