
Sound.start() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
790
|
ActionScript Language Reference
See Also
Sound.getVolume(), Sound.stop(), Sound.stopAllSounds()
Sound.start() Method
begin playing an attached or loaded event sound
Flash 5
soundObject.start(secondOffset, loops)
Arguments
secondOffset A floating-point number indicating the time, in seconds, at which to start
playing the sound attached to
soundObject (often called an entry point). For
example, a
secondOffset of 1 starts playback one second after the sound’s
actual beginning, as defined in the Library. The default is 0. There is no
provision for an exit point (the time at which to stop playing the sound). The
sound plays until its end unless it is stopped manually. See the
position prop-
erty for code that stops a sound after
n milliseconds.
loops A positive integer indicating how many times to play the sound attached to
soundObject. To play the sound once, use 1 (the default); to play the sound
twice in succession, use 2; and so on. The portion of the sound from
secondOffset is repeated to its end the number of times specified by loops.
Applies to nonstreaming sounds only.
Description
The start() method is used to play programmatically defined sounds that were added to
soundObject via attachSound() or loadSound(). The start() method does not play all the
sounds in a clip ...