Package | verlocity.components |
Class | public final class verSound |
Inheritance | verSound Component Singleton Object |
Method | Defined By | ||
---|---|---|---|
verSound()
Constructor of the component. | verSound | ||
_Destruct():void [override]
Destructor of the component. | verSound | ||
_IsNotUpdating():Boolean
Returns if the component is not updating (paused). | Component | ||
_IsValid():Boolean
Returns if this singleton is active/valid. | Singleton | ||
_SetUpdating(bUpdating:Boolean):void
Pauses/resumes the component updating, if it's pausable. | Component | ||
_UpdateComponent():void
Updates the component, if possible. | Component | ||
CountAll():int
Returns the amount of sounds currently alive. | verSound | ||
Create(sSound:*, nStartVolume:Number = 1, bPlayAuto:Boolean = true, bLoops:Boolean = false, bLocationBased:Boolean = false, sGroup:String = default):SoundObject
Creates a sound object and returns it
| verSound | ||
FadeOutAll():void
Fades out (and removes) all sounds. | verSound | ||
GetVolume():Number
Returns the overall volume
| verSound | ||
IsMaxVolume():Boolean
Returns if the volume is at its maximum value. | verSound | ||
IsMinVolume():Boolean
Returns if the volume is at its minimum value. | verSound | ||
IsMuted():Boolean
Returns if the sound is muted. | verSound | ||
Mute():void
Mutes the overall sound
| verSound | ||
PauseAll():void
Pauses all sounds
| verSound | ||
ResumeAll():void
Resumes all paused sounds
| verSound | ||
SetVolume(nSetVolume:Number):void
Sets the overall volume
| verSound | ||
SetVolumeGroup(sGroup:String, nSetVolume:Number):void
Sets the volume of sounds based on group
| verSound | ||
StopAll(bFade:Boolean = false, bGlobal:Boolean = false):void
Stops all sounds (deletes them)
| verSound | ||
StopAllInObject(obj:Object, bFade:Boolean = false):void
Stops all sounds emitted from an object (deletes them)
| verSound | ||
StopGroup(sGroup:String, bFade:Boolean = false):void
Stops all sounds in a group (deletes them)
| verSound | ||
ToggleMute():void
Toggles muting off and on
| verSound | ||
UnMute():void
Unmutes the overall sound
| verSound | ||
VolumeDown(nAmount:Number = .05):void
Turns the overall volume down by a certain amount
Also notifies via HUD messages. | verSound | ||
VolumeUp(nAmount:Number = .05):void
Turns the overall volume up by a certain amount
Also notifies via HUD messages. | verSound |
Method | Defined By | ||
---|---|---|---|
_Concommands():void [override]
Concommands of the component. | verSound | ||
_Update():void [override]
Updates all sounds
| verSound |
verSound | () | Constructor |
public function verSound()
Constructor of the component.
_Concommands | () | method |
override protected function _Concommands():void
Concommands of the component.
_Destruct | () | method |
override public function _Destruct():void
Destructor of the component.
_Update | () | method |
override protected function _Update():void
Updates all sounds
CountAll | () | method |
public final function CountAll():int
Returns the amount of sounds currently alive.
Returnsint —
|
Create | () | method |
public final function Create(sSound:*, nStartVolume:Number = 1, bPlayAuto:Boolean = true, bLoops:Boolean = false, bLocationBased:Boolean = false, sGroup:String = default):SoundObject
Creates a sound object and returns it
Parameters
sSound:* — URL, class, or Sound accepted
| |
nStartVolume:Number (default = 1 ) — The starting volume of the sound
| |
bPlayAuto:Boolean (default = true ) — Play the sound directly after creation
| |
bLoops:Boolean (default = false ) — Should the sound loop?
| |
bLocationBased:Boolean (default = false ) — Should the sound be location based (ie. have a X position)
| |
sGroup:String (default = default ) — The sound group this sound should go in
|
SoundObject —
|
FadeOutAll | () | method |
public final function FadeOutAll():void
Fades out (and removes) all sounds.
GetVolume | () | method |
public final function GetVolume():Number
Returns the overall volume
ReturnsNumber —
|
IsMaxVolume | () | method |
public final function IsMaxVolume():Boolean
Returns if the volume is at its maximum value.
ReturnsBoolean —
|
IsMinVolume | () | method |
public final function IsMinVolume():Boolean
Returns if the volume is at its minimum value.
ReturnsBoolean —
|
IsMuted | () | method |
public final function IsMuted():Boolean
Returns if the sound is muted.
ReturnsBoolean |
Mute | () | method |
public final function Mute():void
Mutes the overall sound
PauseAll | () | method |
public final function PauseAll():void
Pauses all sounds
ResumeAll | () | method |
public final function ResumeAll():void
Resumes all paused sounds
SetVolume | () | method |
public final function SetVolume(nSetVolume:Number):void
Sets the overall volume
Parameters
nSetVolume:Number — The volume to set to (0-1)
|
SetVolumeGroup | () | method |
public final function SetVolumeGroup(sGroup:String, nSetVolume:Number):void
Sets the volume of sounds based on group
Parameters
sGroup:String — The group to set volume of
| |
nSetVolume:Number — The volume to set to (0-1)
|
StopAll | () | method |
public final function StopAll(bFade:Boolean = false, bGlobal:Boolean = false):void
Stops all sounds (deletes them)
Parameters
bFade:Boolean (default = false ) — Fade out the sounds?
| |
bGlobal:Boolean (default = false ) — Stop all sounds (even those that aren't handled by verSound)
|
StopAllInObject | () | method |
public final function StopAllInObject(obj:Object, bFade:Boolean = false):void
Stops all sounds emitted from an object (deletes them)
Parameters
obj:Object — The object that owns the sounds
| |
bFade:Boolean (default = false ) — Fade out the sounds?
|
StopGroup | () | method |
public final function StopGroup(sGroup:String, bFade:Boolean = false):void
Stops all sounds in a group (deletes them)
Parameters
sGroup:String — The string name of the group
| |
bFade:Boolean (default = false ) — Fade out the sounds?
|
ToggleMute | () | method |
public final function ToggleMute():void
Toggles muting off and on
UnMute | () | method |
public final function UnMute():void
Unmutes the overall sound
VolumeDown | () | method |
public final function VolumeDown(nAmount:Number = .05):void
Turns the overall volume down by a certain amount Also notifies via HUD messages.
Parameters
nAmount:Number (default = .05 ) — The amount to turn down the volume by
|
VolumeUp | () | method |
public final function VolumeUp(nAmount:Number = .05):void
Turns the overall volume up by a certain amount Also notifies via HUD messages.
Parameters
nAmount:Number (default = .05 ) — The amount to turn up the volume by
|