Packagecom.pblabs.sound
Classpublic class SoundManager
InheritanceSoundManager Inheritance Object
Implements ISoundManager, ITickedObject

This class implements the ISoundManager interface. See ISoundManager for full documentation.

See also

See ISoundManager for full documentation.


Public Properties
 PropertyDefined By
  maxConcurrentSounds : int = 5
SoundManager
  muted : Boolean
SoundManager
  volume : Number
SoundManager
Protected Properties
 PropertyDefined By
  cachedSounds : Object
SoundManager
  categories : Object
SoundManager
  playingSounds : Array
SoundManager
  rootCategory : SoundCategory
SoundManager
Public Methods
 MethodDefined By
  
SoundManager
  
createCategory(category:String):void
SoundManager
  
getCategoryMuted(category:String):Boolean
SoundManager
  
getCategoryTransform(category:String):SoundTransform
SoundManager
  
getCategoryVolume(category:String):Number
SoundManager
  
getSoundHandlesInCategory(category:String, outArray:Array):void
SoundManager
  
isInPlayingSounds(sh:SoundHandle):Boolean
SoundManager
  
onTick(elapsed:Number):void
SoundManager
  
play(sound:*, category:String = sfx, pan:Number = 0.0, loopCount:int = 0, startDelay:Number = 0.0, resourceType:Class = null):SoundHandle
SoundManager
  
removeCategory(category:String):void
SoundManager
  
removeSoundHandle(sh:SoundHandle):void
SoundManager
  
setCategoryMuted(category:String, value:Boolean):void
SoundManager
  
setCategoryTransform(category:String, transform:SoundTransform):void
SoundManager
  
setCategoryVolume(category:String, value:Number):void
SoundManager
  
stopAll():void
SoundManager
  
stopCategorySounds(category:String):void
SoundManager
  
stream(url:String, category:String = sfx, pan:Number = 0.0, loopCount:int = 1, startDelay:Number = 0.0):SoundHandle
SoundManager
  
SoundManager
Protected Methods
 MethodDefined By
  
_handleStreamFailure(e:IOErrorEvent):void
SoundManager
Public Constants
 ConstantDefined By
  MUSIC_MIXER_CATEGORY : String = music
[static]
SoundManager
  SFX_MIXER_CATEGORY : String = sfx
[static]
SoundManager
Property Detail
cachedSoundsproperty
protected var cachedSounds:Object

categoriesproperty 
protected var categories:Object

maxConcurrentSoundsproperty 
public var maxConcurrentSounds:int = 5

mutedproperty 
muted:Boolean


Implementation
    public function get muted():Boolean
    public function set muted(value:Boolean):void
playingSoundsproperty 
protected var playingSounds:Array

rootCategoryproperty 
protected var rootCategory:SoundCategory

volumeproperty 
volume:Number


Implementation
    public function get volume():Number
    public function set volume(value:Number):void
Constructor Detail
SoundManager()Constructor
public function SoundManager()



Method Detail
_handleStreamFailure()method
protected function _handleStreamFailure(e:IOErrorEvent):void

Parameters

e:IOErrorEvent

createCategory()method 
public function createCategory(category:String):void

Parameters

category:String

getCategoryMuted()method 
public function getCategoryMuted(category:String):Boolean

Parameters

category:String

Returns
Boolean
getCategoryTransform()method 
public function getCategoryTransform(category:String):SoundTransform

Parameters

category:String

Returns
SoundTransform
getCategoryVolume()method 
public function getCategoryVolume(category:String):Number

Parameters

category:String

Returns
Number
getSoundHandlesInCategory()method 
public function getSoundHandlesInCategory(category:String, outArray:Array):void

Parameters

category:String
 
outArray:Array

isInPlayingSounds()method 
public function isInPlayingSounds(sh:SoundHandle):Boolean

Parameters

sh:SoundHandle

Returns
Boolean
onTick()method 
public function onTick(elapsed:Number):void

Parameters

elapsed:Number

play()method 
public function play(sound:*, category:String = sfx, pan:Number = 0.0, loopCount:int = 0, startDelay:Number = 0.0, resourceType:Class = null):SoundHandle

Parameters

sound:*
 
category:String (default = sfx)
 
pan:Number (default = 0.0)
 
loopCount:int (default = 0)
 
startDelay:Number (default = 0.0)
 
resourceType:Class (default = null)

Returns
SoundHandle
removeCategory()method 
public function removeCategory(category:String):void

Parameters

category:String

removeSoundHandle()method 
public function removeSoundHandle(sh:SoundHandle):void

Parameters

sh:SoundHandle

setCategoryMuted()method 
public function setCategoryMuted(category:String, value:Boolean):void

Parameters

category:String
 
value:Boolean

setCategoryTransform()method 
public function setCategoryTransform(category:String, transform:SoundTransform):void

Parameters

category:String
 
transform:SoundTransform

setCategoryVolume()method 
public function setCategoryVolume(category:String, value:Number):void

Parameters

category:String
 
value:Number

stopAll()method 
public function stopAll():void

stopCategorySounds()method 
public function stopCategorySounds(category:String):void

Parameters

category:String

stream()method 
public function stream(url:String, category:String = sfx, pan:Number = 0.0, loopCount:int = 1, startDelay:Number = 0.0):SoundHandle

Parameters

url:String
 
category:String (default = sfx)
 
pan:Number (default = 0.0)
 
loopCount:int (default = 1)
 
startDelay:Number (default = 0.0)

Returns
SoundHandle
updateSounds()method 
public function updateSounds():void

Constant Detail
MUSIC_MIXER_CATEGORYConstant
public static const MUSIC_MIXER_CATEGORY:String = music

SFX_MIXER_CATEGORYConstant 
public static const SFX_MIXER_CATEGORY:String = sfx