EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Sound Class

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
624 Chapter 12: ActionScript Dictionary
In addition to this onStatus handler, Flash also provides a “super” function called
System.onStatus. If
onStatus is invoked for a particular object and there is no function assigned
to respond to it, Flash processes a function assigned to
System.onStatus if it exists.
The following events notify you when certain SharedObject activities occur.
See also
SharedObject.getLocal()
, System.onStatus
Sound class
Availability
Flash Player 5.
Description
The Sound class lets you control sound in a movie. You can add sounds to a movie clip from the
library while the movie is playing and control those sounds. If you do not specify a target when
you create a new Sound object, you can use the methods to control sound for the whole movie.
You must use the constructor
new Sound to create a Sound object before calling the methods of
the Sound class.
Method summary for the Sound class
Code property Level property Meaning
SharedObject.Flush.Failed
Error A SharedObject.flush() command that returned
"pending" has failed (the user did not allot
additional disk space for the shared object when
Flash Player displayed the Local Storage Settings
dialog box).
SharedObject.Flush.Success
Status A SharedObject.flush() command that returned
"pending" has been successfully completed
(the user allotted additional disk space for the
shared object).
Method Description
Sound.attachSound() Attaches the sound specified in the parameter.
Sound.getBytesLoaded() Returns the number of bytes loaded for the specified sound.
Sound.getBytesTotal() Returns the size of the sound in bytes.
Sound.getPan() Returns the value of the previous setPan() call.
Sound.getTransform() Returns the value of the previous setTransform() call.
Sound.getVolume() Returns the value of the previous setVolume() call.
Sound.loadSound() Loads an MP3 file into Flash Player.
Sound.setPan() Sets the left/right balance of the sound.

Table of Contents

Related product manuals