
Код AS3:
public function removeAllSounds():void
{
SoundMixer.stopAll();
var thisSoundChannel:SoundChannel;
while (mSoundChannels.length)
{
thisSoundChannel = mSoundChannels.pop() as SoundChannel;
if (thisSoundChannel)
{
thisSoundChannel.stop(); // остановка звука
thisSoundChannel.removeEventListener(Event.SOUND_COMPLETE, OnSFXComplete);
}
}
soundTransforms.splice(idx, soundTransforms.length); // soundTransforms = [];
}