Lingo Dictionary > S > sprite...intersects |
![]() ![]() ![]() |
sprite...intersects
Syntax
sprite(
sprite1
).intersects(
sprite2
)
sprite
sprite1
intersects
sprite2
Description
Keyword; operator that compares the position of two sprites to determine whether the quad of sprite1
touches (TRUE
) or does not touch (FALSE
) the quad of sprite2
.
If both sprites have matte ink, their actual outlines, not the quads, are used. A sprite's outline is defined by the nonwhite pixels that make up its border. The Matte ink does not work with vector shape sprites.
This is a comparison operator with a precedence level of 5.
Note: The dot operator is required whenever sprite1 is not a simple expressionthat is, one that contains a math operation.
Example
This statement checks whether two sprites intersect and, if they do, changes the contents of the field cast member Notice to "You placed it correctly."
if sprite i intersects j then put "You placed it correctly." into member "Notice"
See also
![]() ![]() ![]() |