teotigraphix / as3wavsound

Automatically exported from code.google.com/p/as3wavsound
Other
2 stars 1 forks source link

Event.SOUND_COMPLETE #23

Open pedrosimao opened 7 years ago

pedrosimao commented 7 years ago

Hello, I am trying to fire an event when the sound have been played till the end. In normal SoundChannel classes we can add an EventListener of the Event.SOUND_COMPLETE type.

I tried tot to the same with the WavChannel class proposed by this code, but the event is being fired much before the end of the file. Any alternative methods? Or suggestions to overcome this?

pedrosimao commented 7 years ago

Ok, I just found a way to deal with the bug. I created a timer and I only release the SOUND_COMPLETE flag from inside the WavChannel with a 1000ms delay. That did the trick for now.