There are some mp3 files with silence in the end or not proper end-of-file
bytes...

Sometimes it fires after some delay. Does it never fire in ur case?

Not sure what is the exact problem, it also happens with FLVs...

You might want to have a timer running that checks if sound is not buffering
and playhead has stopped (not moved for last N seconds), fire the event
manually? Yeah, take care of case when user might have paused the audio :)

-abdul


On 10/30/07, Mark <[EMAIL PROTECTED]> wrote:
>
>   I have a sound/sound channel being set up in my actionscript and
> playing as expected, however the sound_complete event is not firing in
> all cases. I am attaching an event listener for this event after the
> play call, yet the associated handler is not called every time when an
> mp3 file reaches the end. There seems to be no pattern as to when it
> does/doesn't fire as expected. Code is fairly simple as follows
> (SoundAsset is a class that wraps a Sound object with several other
> associated variables, soundHandle returns the Sound object):
>
> public function setupSound(inSound:SoundAsset):void {
> soundAsset = inSound;
> if(!inSound.soundHandle.isBuffering) {
> playingSound = inSound.soundHandle;
> playingSound.play(0);
> playingSound.addEventListener(Event.SOUND_COMPLETE,
> soundCompleteHandler);.....
>
> private function soundCompleteHandler(event:Event):void {
> trace("I hit the sc handler");.....
>
> As I said, the mp3 file finishes playing but sometimes the
> sound_complete does not fire. Anyone ever come across a similar
> situation, or can offer any suggestions as to incorrectly set up code?
>
> TIA,
> --Mark
>
>  
>



-- 
-abdul
---------------------------------------
http://abdulqabiz.com/blog/
---------------------------------------

Reply via email to