480
Examples
The following examples start the streaming process for the stream in sprite 2 and the cast
member Real.
sprite(2).play()
member("Real").play()
See also
mediaStatus
,
pause (RealMedia)
,
seek
,
stop (RealMedia)
play() (sound)
Syntax
sound(
channelNum
).play()
sound(
channelNum
).play(member
(
whichMember
))
sound(
channelNum
).play([#member: member(
whichmember
), {#startTime:
milliseconds
, #endTime:
milliseconds
, #loopCount:
numberOfLoops
,
#loopStartTime:
milliseconds
, #loopEndTime:
milliseconds
, #preloadTime:
milliseconds
}])
Description
This function begins playing any sounds queued in
soundObject
, or queues and begins playing
the given member.
Sound 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 function. 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. These
properties may be optionally set:
To see an example of
play() (sound)
used in a completed movie, see the Sound Control movie
in the Learning/Lingo Examples folder inside the Director application folder.
Examples
This statement plays cast member introMusic in sound channel 1:
sound(1).play(member("introMusic"))
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
.
#loopEndTime
The time within the sound to end a loop, in milliseconds. See
loopEndTime
.
#preloadTime
The amount of the sound to buffer before playback, in milliseconds. See
preloadTime
.
Summary of Contents for DIRECTOR MX-LINGO DICTIONARY
Page 1: ...Lingo Dictionary Macromedia Director MX...
Page 756: ...Index 756...