Yes i had been reviewing my Actionscript 3.0 code for hour and could not find any reason why my sound_complete event was not getting fired and when you see that logically your code should work fine and u don’t find any logical errors in your code but code doesn’t run as you expected then it pisses me off. 😀
In my code i am playing zombie sound on background when zombies appears and i am replaying sound whenever sound complete playing. So bottom line, i am adding SOUND_COMPLETE event to soundchannel but event doesn’t get fired. Here is the extract from the code that i wrote before my problem got solved:

initSound(){
     zombieSound = new Sound("zombie.mp3");
     soundChannel.addEventListener(Event.SOUND_COMPLETE, zombieSoundComplete);
}

whenZombieEnters(){
soundChannel=zombieSound.play();
}

private function zombieSoundComplete(event:Event):void{
        //replay my zombie sound
}

So that was it and i could not figured out why event wasn’t getting fired. So after googling on this topic i found that whenever i call sound object to play then it returns new instance of SoundChannel so now my soundChannel reference is holding the reference to new returned SoundChannel instance from my zombieSound.play(). SO then i just added the SOUND_COMPLETE event after sound object is called to play. Here is the new code:

initSound(){
     zombieSound = new Sound("zombie.mp3");
}

whenZombieEnters(){
soundChannel=zombieSound.play();
soundChannel.addEventListener(Event.SOUND_COMPLETE, zombieSoundComplete);
}

So the solution, since sound.play() was returning new instance of SoundChannel everytime so i had to add event listener to new instance of Sound Channel so i am adding event after play() call and that solved the problem. Now my SOUND_COMPLETE event is getting fired. Yeppe 😀

Gracias.