Game Development Reference
In-Depth Information
for each( var soundObj:SoundEngineObject in
soundList )
TweenLite.killTweensOf( soundObj,
_complete );
public static function killTweensOf( _sound:String,
_complete:Boolean = false ):void
var soundObj:SoundEngineObject = SoundEngine.
getInstance().soundList[ _sound ];
if( soundObj )
TweenLite.killTweensOf( soundObj,
_complete );
This class consists of a set of static methods that directly
interface with the SoundEngineObjects and the list of them con-
tained in the SoundEngine. Simply provide the name of the sound
you want to control and pass it parameters the same way you
would any other kind of tween object. Here
s how it would look in
var se:SoundEngine = SoundEngine.getInstance();
se.playSound( " EngineHum " );
SoundTweener.from( " EngineHum " , 1, { volume:0 } );
This will start an engine sound and then tween it to its normal
also pass any custom-easing functions to give your sound just the
effect you
re looking to achieve.
The SoundMixer Class
One other class worth mentioning in the audio section of Flash is
the SoundMixer. It is the global sound controller for the
Flash Player and has its own SoundTransform. If you need to do
something basic like simply mute all the sounds in your game
outside of the SoundEngine, you can accomplish it with a very
simple script.
SoundMixer.soundTransform = new SoundTransform(0);
You can also use the SoundMixer to stop every sound that is
playing inside of Flash, the descendant of stopAllSounds() from
Search Nedrilad ::

Custom Search