Packagecom.bourre.media.sound
Classpublic class MixSoundFactory
InheritanceMixSoundFactory Inheritance SoundFactory

Player version: Flash Player 9.0
Language version: ActionScript 3.0

The MixSoundFactory class.
  You can control the SoundFactory with :
    a master volume
    gain of a sound ( relative to the master volume)
    pan of a sound
  
  For instance, if the master volume is to 0.5 and the gain of a sound to 0.5
  the real volume for this sound is 0.25.
  



Public Methods
 MethodDefined by
  
MixSoundFactory
  
addSound(id:String):void
Add a new sound.
MixSoundFactory
  
addSounds(a:Array):void
Adds a list of sounds.
MixSoundFactory
 Inherited
clear():void
Stops all sounds, clears sounds lists and reset : you must reinitialise it after with init().
SoundFactory
 Inherited
getActiveChannel(id:String):Array
Return an Array of all SoundChannel instances use by the id passed-in
SoundFactory
 Inherited
getAllSounds():Array
Get all Sound instances stored under passed-in sound's class identifier.
SoundFactory
  
getGain(id:String):Number
Get gain : volume for a sound ( 0 to n ).
MixSoundFactory
  
getPan(id:String):Number
Get Pan of a sound ( -1 to 1 ).
MixSoundFactory
 Inherited
Get all sound's class identifier use
SoundFactory
 Inherited
getSound(id:String):Sound
Returns a Sound instance stored under passed-in sound's class identifier : if your SoundFactory isOn() = true : return a Sound or throw a NoSuchElementException if it doesn't exist if your SoundFactory isOn() = true : return a NullSound
SoundFactory
  
getVolume():Number
Get Master Volume ( 0 to 1 ).
MixSoundFactory
 Inherited
goOff():void
Turns "playing" mode off and stops all currently played sounds.
SoundFactory
 Inherited
goOn():void
Turns "playing" mode on.
SoundFactory
 Inherited
init(applicationDomain:ApplicationDomain = null):void
Defines passed-in applicationDomain as the sound library's applicationDomain.
SoundFactory
 Inherited
isOn():Boolean
Checks if "playing" mode is enable or not.
SoundFactory
 Inherited
isPlaying(id:String = null):Boolean
Without argument : it return a Boolean to indicate if there is at least one sound is playing.
SoundFactory
 Inherited
isRegistered(id:String):Boolean
Check if a sound is already register
SoundFactory
 Inherited
pause():void
Pause all sounds.
SoundFactory
 Inherited
playSound(id:String):void
Play a sound simply according to its Class identifier in the library : only if isOn() = true
SoundFactory
 Inherited
playSoundLoop(id:String):void
Play a sound in loop ( int.MAX_VALUE times ) according to its Class identifier in the library : only if isOn() = true
SoundFactory
 Inherited
removeSound(id:String):void
Removes Sound instance stored under passed-in sound's class identifier.
SoundFactory
 Inherited
resume():void
Resume all sounds stopped with pause().
SoundFactory
  
setAllGain(n:Number):void
Set the same gain for all sounds ( 0 to n ).
MixSoundFactory
  
setAllPan(n:Number):void
Set the same pan for all sounds ( -1 to 1 ).
MixSoundFactory
  
setGain(id:String, n:Number):void
Set gain : volume for a sound ( 0 to n ).
MixSoundFactory
  
setPan(id:String, n:Number):void
Set Pan of a sound ( -1 to 1 ).
MixSoundFactory
  
setVolume(n:Number):void
Set Master Volume ( 0 to 1 ).
MixSoundFactory
 Inherited
stopSound(id:String = null):void
Without argument it stop all channels of all sounds.
SoundFactory
 Inherited
toggleOnOff():void
Toggles "playing" mode.
SoundFactory
 Inherited
toString():String
Returns the string representation of this instance.
SoundFactory
Constructor detail
MixSoundFactory()constructor
public function MixSoundFactory()

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Method detail
addSound()method
public override function addSound(id:String):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Add a new sound.

Parameters
id:String — class identifier in the library

See also

addSounds()method 
public override function addSounds(a:Array):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Adds a list of sounds. Add all sounds except for IllegalArgumentException and ClassCastException.

Parameters
a:Array — array of sound's class identifier (in the library)

See also

getGain()method 
public function getGain(id:String):Number

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Get gain : volume for a sound ( 0 to n ). By default all sounds gain is set to 1 ( equals to 100% ).

Parameters
id:String — class identifier in the library

Returns
Number

See also

getPan()method 
public function getPan(id:String):Number

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Get Pan of a sound ( -1 to 1 ). By default all sounds pan is set 0 .

Parameters
id:String — class identifier in the library

Returns
Number

See also

getVolume()method 
public function getVolume():Number

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Get Master Volume ( 0 to 1 ). By default master volume is set to 1.

Returns
Number

See also

setAllGain()method 
public function setAllGain(n:Number):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Set the same gain for all sounds ( 0 to n ). By default all sounds gain is set to 1 ( equals to 100% ).

Parameters
n:Number — number between 0 and n for all sound volume

See also

setAllPan()method 
public function setAllPan(n:Number):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Set the same pan for all sounds ( -1 to 1 ). By default all sounds pan is 0.

Parameters
n:Number — number between -1 and 1 for its volume ( 0 is the center )

See also

setGain()method 
public function setGain(id:String, n:Number):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Set gain : volume for a sound ( 0 to n ). By default all sounds gain is set to 1( equals to 100% ).

Parameters
id:String — class identifier in the library
 
n:Number — number between 0 and n for this sound volume

See also

setPan()method 
public function setPan(id:String, n:Number):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Set Pan of a sound ( -1 to 1 ). By default all sounds pan is set to 0.

Parameters
id:String — class identifier in the library
 
n:Number — number between -1 and 1 for its volume ( 0 is the center )

See also

setVolume()method 
public function setVolume(n:Number):void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Set Master Volume ( 0 to 1 ). By default master volume is set to 1.

Parameters
n:Number — to 1

See also