| Package | com.whirled.contrib |
| Class | public class SimpleSoundManager |
| Property | Defined by | ||
|---|---|---|---|
| _baseVols : Dictionary A mapping of SoundChannel objects to their base volume.
| SimpleSoundManager | ||
| _volume : Number = 1 The global volume value.
| SimpleSoundManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
Construct a SimpleSoundManager.
| SimpleSoundManager | ||
|
addChannel(channel:SoundChannel):void
Add a sound channel to be tracked.
| SimpleSoundManager | ||
|
removeChannel(channel:SoundChannel):void
Stop tracking the specified channel.
| SimpleSoundManager | ||
|
setGlobalVolume(volume:Number):void
Set the global volume of all the registered SoundChannels.
| SimpleSoundManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
adjustVolume(channel:SoundChannel):void
Used to adjust the volume on each channel when registered, or the global volume
changes.
| SimpleSoundManager | ||
|
handleChannelStopped(event:Event):void
Take care of removing a channel that's been stopped.
| SimpleSoundManager | ||
| _baseVols | property |
protected var _baseVols:DictionaryA mapping of SoundChannel objects to their base volume.
| _volume | property |
protected var _volume:Number = 1The global volume value.
| SimpleSoundManager | () | constructor |
public function SimpleSoundManager()Construct a SimpleSoundManager.
| addChannel | () | method |
public function addChannel(channel:SoundChannel):voidAdd a sound channel to be tracked. The initial volume level of this channel is taken to be the "base" sound level, so that when the global volume is adjusted this channel will adjust between 0 and the base. The channel will be automatically removed when it stops.
Parameterschannel:SoundChannel |
| adjustVolume | () | method |
protected function adjustVolume(channel:SoundChannel):voidUsed to adjust the volume on each channel when registered, or the global volume changes.
Parameterschannel:SoundChannel |
| handleChannelStopped | () | method |
protected function handleChannelStopped(event:Event):voidTake care of removing a channel that's been stopped.
Parametersevent:Event |
| removeChannel | () | method |
public function removeChannel(channel:SoundChannel):voidStop tracking the specified channel. This does not adjust the volume or stop the sound in any way.
Parameterschannel:SoundChannel |
| setGlobalVolume | () | method |
public function setGlobalVolume(volume:Number):voidSet the global volume of all the registered SoundChannels.
Parametersvolume:Number — a value between 1 (full volume) to 0 (silent).
|