
Sound Class
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
769
Example
The following onStatus() handler is executed after the user has decided whether to allow
enough disk space to save
theSharedObj_so. If enough space is not provided, the code
disables the application:
theSharedObj_so.onStatus = function (infoObject) {
// The infoObject's code property tells us whether the user
// provided enough space to save the SharedObject.
if (infoObject.code = = "SharedObject.Flush.Success") {
// Space was provided.
output_txt.text = "Required disk space added. Application saved.";
} else if (infoObject.code = = "SharedObject.Flush.Failed") {
// Space was not provided.
output_txt.text += "You must increase disk space to use this application.";
// Display an "application disabled" frame.
gotoAndStop("disabled");
}
}
See Also
SharedObject.flush(), SharedObject.getSize()
Sound Class
control over sounds in a movie and external sound loading tools
Flash 5; enhanced in Flash 6
Constructor
new Sound()
new Sound(target)
Arguments
target A string indicating the path to the movie clip or document level whose sound
is to be controlled. It can also be a reference to a movie clip or document level
(references are converted to paths when used in a string context).
Properties
duration The total length of the sound, in milliseconds. ...