450
Chapter 12: Methods
These statements start playing 10 seconds into chapter 2 and finish playing at 17 seconds:
member(15).play([#title:2, #seconds:10], [#title:2, #seconds:17])
See also
DVD
,
startTimeList
,
stopTimeList
play() (Sound Channel)
Usage
-- Lingo syntax
soundChannelObjRef
.play()
soundChannelObjRef
.play(
memberObjRef
)
soundChannelObjRef
.play(
propList
)
// JavaScript syntax
soundChannelObjRef
.play();
soundChannelObjRef
.play(
memberObjRef
);
soundChannelObjRef
.play(
propList
);
Description
Sound Channel method; begins playing any sounds queued in a sound channel, or queues and
begins playing a given cast member.
Sound cast members take some time to load into RAM before they can begin playback. It’s
recommended that you queue sounds with
queue()
before you want to begin playing them and
then use the first form of this method. The second two forms do not take advantage of the pre-
loading accomplished with the
queue()
command.
By using an optional property list, you can specify exact playback settings for a sound.
To see an example of
play()
used in a completed movie, see the Sound Control movie in the
Learning/Lingo folder inside the Director application folder.
Parameters
memberObjRef
Required if playing a specific cast member. A reference to the cast member object
to queue and play.
propList
Required if specifying playback settings for a sound. A property list that specifies the
exact playback settings for the sound. These properties may be optionally set:
Property
Description
#member
The sound cast member to queue. This property must be provided; all others are
optional.
#startTime
The time within the sound at which playback begins, in milliseconds. The default is
the beginning of the sound. See
startTime
.
#endTime
The time within the sound at which playback ends, in milliseconds. The default is
the end of the sound. See
endTime
.
#loopCount
The number of times to play a loop defined with
#loopStartTime
and
#loopEndTime
. The default is 1. See
loopCount
.
#loopStartTime
The time within the sound to begin a loop, in milliseconds. See
loopStartTime
.
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...