S > Sound (object)
Sound (object)
The Sound object allows you to set and control sounds in a particular movie clip instance, or for the global Timeline, if you do not specify a target
when creating a new sound object. You must use the constructor new Sound
to create an instance of the Sound object before calling the methods of the Sound object.
The Sound object is only supported for the Flash 5 Player.
Attaches the sound specified in the argument. Returns the value of the previous setPan call. Returns the value of the previous setTransform call. Returns the value of the previous setVolume call. Sets the left/right balance of the sound. Sets transform for a sound. Sets the volume level for a sound. Starts playing a sound from the beginning or, optionally, from an offset point set in the argument. Stops the specified sound or all sounds currently playing.
Method summary for the Sound object
Method
Description
attachSound
getPan
getTransform
getVolume
setPan
setTransform
setVolume
start
stop
Constructor for the Sound object
Syntax
new Sound();new Sound(
target
);
Arguments
target
The movie clip instance that the Sound object applies to. This argument is optional.
Description
Method; creates a new Sound object for a specified movie clip. If you do not specify a target
, the Sound object controls all of the sounds in the global Timeline.
Player
Flash 5 or later.
Example
GlobalSound = new Sound();
MovieSound = new Sound(
mymovie
);