
Playing Shockwave Audio, Windows Media Audio, and MP3 audio with Lingo or JavaScript syntax
239
4
Drag the Shockwave Audio cast member to a sprite channel (
not
one of the sound channels) to
create a sprite. Extend the sprite through all frames in which the sound should play, or use the
tempo channel to make the movie wait for the end of the sound. For more information, see
“Synchronizing media” on page 240
.
You can’t place streaming audio cast members in the sound channels. The sound streams from
the source location when the movie plays.
Playing Shockwave Audio, Windows Media Audio, and MP3
audio with Lingo or JavaScript syntax
Use SWA script to preload and control SWA and MP3 sounds and to determine how much
sound has streamed over the Internet.
Script that controls other types of sounds can also control streaming SWA and MP3 sounds by
controlling the sound channel in which the sound plays. For more information about the
following methods and properties, see the Scripting Reference topics in the Director Help Panel.
•
To preload part of a streaming sound file into memory, use the
preLoadBuffer member
method.
•
To specify the amount of a streaming cast member to download before playback begins, set the
preLoadTime
cast member property.
•
To determine what percentage of a streaming sound file has played, test the
percentPlayed
cast member property.
•
To determine the percent of a streaming file that has streamed from an Internet server, test the
percentStreamed
cast member property.
•
To specify the sound channel in which a streaming sound plays, set the
soundChannel
property.
•
To begin playback of a streaming cast member, use the
play member
method.
•
To pause a streaming sound file, use the
pause member
method.
•
To stop a streaming sound file, use the
stop member
method.
•
To determine the state of a streaming sound file, test the
state
cast member property.
•
To determine whether an error occurred when streaming a sound file, use the
getError()
method.
•
To obtain a string describing an error that occurred when streaming a sound file, use the
getErrorString()
method.
•
To determine the length of a streaming sound file, use the
duration
cast member
property.
•
To determine the bit rate of a streaming sound cast member, test the
bitRate
cast member
property.
•
To determine the original bit depth of a streaming sound, test the
bitsPerSample
property.
•
To determine the sample rate of the original sound used for a streaming cast member, test the
sampleRate
cast member property.
•
To determine the number of channels in a streaming sound, test the
numChannels
streaming
cast member property.
•
To specify a streaming sound’s volume, specify the
volume
streaming cast member property.
•
To specify a streaming sound file’s URL, set the
URL
cast member property.
•
To obtain or set the copyright text in a streaming sound file, test or set the
copyrightInfo
cast
member property.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...