
Sound.stop() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
791
// Play only a portion of boink, starting 0.5 seconds in (loops defaults to 1)
boink.start(.5);
// Play boink three times from beginning to end
boink.start(0, 3);
See Also
Sound.loadSound(), Sound.position, Sound.stop()
Sound.stop() Method
silence all sounds or a specified attached or loaded sound
Flash 5
soundObject.stop()
soundObject.stop(linkageIdentifier)
Arguments
linkageIdentifier
The name of any sound attached to any Sound object with the same
target as
soundObject. Linkage identifiers are specified in the Library under Options ➝
Linkage.
Description
When invoked without a linkageIdentifier, stop() silences all sounds controlled by
soundObject;ifsoundObject is a global sound, stop() silences all sounds in a movie; if
soundObject was created with a target parameter, stop() silences all sounds in target.
When invoked with a
linkageIdentifier, stop() silences only the specific sound named by
linkageIdentifier. In that case, linkageIdentifier must be a sound that was attached to a
Sound object via attachSound(). However, the sound to stop need not be attached to
soundObject itself. It can be attached to any Sound object that shares the same target as
soundObject. Or, if soundObject was created with no target (i.e., is a global Sound object), ...