aduros/flambe — pull request #188 by braddelcat (2013-11-05 21:50:34+00:00)
Title: Fix to FlashSound.hx

Used weak listener and used removeEventListener on dispose so that sounds can be garbage collected in Flash. This was causing major issues with memory, noticeable in larger games, and resulted in errors after a certain approximate number of sounds played, but not in isolated test cases where the same sounds were being used.

Also instantiated a SoundChannel when the return from flash.media.Sound.play() was null, to avoid errors. Now, in the rare event that Flash runs out of sound channels, they just won't play.