![MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference Download Page 224](http://html1.mh-extra.com/html/macromedia/director-mx-2004-director-scripting/director-mx-2004-director-scripting_reference_3321720224.webp)
224
Chapter 11: Keywords
set...to, set...=
Usage
-- Lingo syntax
lingoProperty
=
expression
variable
=
expression
Description
Command; evaluates an expression and puts the result in the property specified by
lingoProperty
or the variable specified by
variable
.
Example
This statement sets the name of member 3 to Sunset:
member(3).name = "Sunset"
The following statement sets the
soundEnabled
property to the opposite of its current state.
When
soundEnabled
is
TRUE
(the sound is on), this statement turns it off. When
soundEnabled
is
FALSE
(the sound is off ), this statement turns it on.
_sound.soundEnabled = not(_sound.soundEnabled)
This statement sets the variable
vowels
to the string “aeiou”:
vowels = "aeiou"
See also
property
sprite...intersects
Usage
-- Lingo 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.
This is a comparison operator with a precedence level of 5.
Note:
The dot operator is required whenever sprite1 is not a simple expression—that 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
sprite...within
,
quad
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...