Chapter 18
460
Motions
A motion is an animation of a model. Motions can be shared by multiple models. A 3D cast
member contains a palette of motions that are available to any model in the world.
The following commands and properties can be used to perform basic motion operations:
Lights
Models in the 3D world are illuminated by lights. Each light has a color, direction, intensity, and
other characteristics. By default, each 3D cast member contains one white light, which lets
Director users see the models in the cast member without having to explicitly add a light. This
light has a default position of upper-center in the world. You can modify or replace this light with
one or more new lights. To turn off the default light, set its
color
property to
rgb(0,0,0)
.
The following commands and properties can be used to perform basic light operations:
Command
Function
Returns
motion.count
Returns the number of motion objects included in
the cast member.
Integer.
motion
(
name
)
Returns the motion named
name
.
Returns the motion object named
name
if it exists. Returns
void
if the
object does not exist.
motion
[
index
]
Returns the motion at the designated position in the
palette of available motions.
Returns the motion object at that
index number if it exists. Returns
void
if the object does not exist at
that index number.
newMotion
(
name
)
Creates a new motion object.
Returns a new motion object with a
unique name. If the name isn’t
unique, returns a Lingo error.
deleteMotion
(
name
)
Deletes the motion named
name
. Lingo references
to this motion persist but return
void
.
TRUE (1)
if the motion named
name
exists.
FALSE (0)
if
the motion named
name
doesn’t
exist.
deleteMotion
(
index
)
Deletes the motion at the given index. Lingo
references to this motion persist but return
void
.
TRUE (1)
if the motion with this
index number exists.
FALSE (0)
if
the motion with this index number
doesn’t exist.
Command
Function
Returns
light.count
Returns the number of light objects included in the
cast member.
Integer.
light
(
name
)
Returns the light named
name
.
Returns the light object named
name
if it exists. Returns
void
if the
object does not exist.
light
[
index
]
Returns the light at the designated position in the
index. The index number can change if lights are
added or deleted.
Returns the light object at that
index number if it exists. Returns
void
if the object does not exist at
that index number.
newLight
(
name
,
type
)
Creates a new light and adds it to the light object
list. The
type
can be
#ambient
,
#directional
,
#point
, or
#spot.
Returns a new light object with a
unique name. If the name isn’t
unique, returns a Lingo error.
Содержание DIRECTOR MX-USING DIRECTOR MX
Страница 1: ...Using Director MX Macromedia Director MX...
Страница 12: ...Contents 12...
Страница 156: ...Chapter 4 156...
Страница 202: ...Chapter 6 202...
Страница 244: ...Chapter 7 244...
Страница 292: ...Chapter 10 292...
Страница 330: ...Chapter 12 330...
Страница 356: ...Chapter 13 356...
Страница 372: ...Chapter 14 372...
Страница 442: ...Chapter 16 442...
Страница 472: ...Chapter 18 472...
Страница 520: ...Chapter 19 520...
Страница 536: ...Chapter 20 536...
Страница 562: ...Chapter 23 562...
Страница 566: ...Chapter 24 566...
Страница 602: ...Chapter 27 602...